I read my girlfriend's diary after some friends told me she was touchy with a guy in a bar

I have a girlfriend for almost 3 years now, we are both in college (me in cs and she is in architecture) and living together. However, we are not sleeping together for 1 year already. I asked her numerous times about it, but she always told me, that she does not know what is wrong with her and does not have a definite answer. Me, loving her, overlooked it and stopped asking her about it, I thought it was a problem she needs to deal with herself and she started being more affectionate with me, so I thought it is starting to get better.

It was 3 months since I last asked, but now she started being a little distant. Not wanting to cuddle that much, less kissing, not going for dates, telling me she needs to study and is behind the schedule. I asked her again and was met with not so welcoming response and her getting upset and not wanting to talk with me about it.

I told this to my friends and they told me that a guy has been touchy with her few weeks back, but she was really drunk and were not paying much attention to it by not telling me. One friend went to the guy and told him to back off, my GF went home without words and the guy said that she knows her for some time and that he does not know, she has a BF. So, I decided to go through her diary, I know it is a breach of privacy, but I ran out of options and felt cornered. Turns out, she writes about him, more about me. They were not a lot of days in the diary, but she mentioned him often, the last record was from a few days back, where she wrote she thinks of this guy often, wanting to write him, but knowing it is bad and she cannot. Me being kinda about to crash out went to her iMessage and found out she is writing with him for about a year, the same time we stopped sleeping together, talking about going to a cafe, going for a walk and spending time together, when during the same time she told me she has no time to go out, because she has to write her thesis.

I confronted her, telling her, my friends told me about this guy. She told me that they went outside once, which I cannot say is a lie, because I did not go through the diary and texts into detail, because I remembered I am a piece of scum and should allow her some privacy (too late I guess for that lol). After that she got upset again and went to sleep.

This post is more about me yapping to strangers on the internet and wanting to vent out my anger than to find justification or reprehension about my actions. I still love her, I think. Hovewer, with this she really hurt my trust in her. I want to talk to her about it somehow, but I cannot bring myself to mention the diary and the messages, but it seems she does not want to admit that she is dreaming about this guy for almost an year and sacrificing her free time for him instead of me.

If someone would like to voice his opinion about this situation, I would be more than glad to read it. I tried to be as objective as possible.