<human>: Can you condense the text into three sentences or less?

I have been dating my girlfriend for almost 16 months, we are in a semi-long distance relationship. She is at college. We worked well and never fought until she left but even then just a few minor things. We are both 18. 
Last night I gave her my Facebook login to look at some pictures on someone else's page she couldnt see. She went and looked at my messages and of course stupid Facebook doesnt advertise that even after things are deleted they are only archived. But she looked through those and found messages between me and my ex(we dated maybe a month and a half, current girlfriend HATES her) from last january when we(current girlfriend and I) had just started dating. We talked about her problems and I offered to "be there for her" in the form of massages, talked about vacationing together, and flirted. My girlfriend read all of this.

I am completely stunned by my own behavior. With it being over a year after any of this, I have no recollection of it. Nothing to do with drugs or alcohol, but I simply dont remember and have no idea why I would talk to her like that.

My girlfriend is going on and on about how the first few months of our relationship mean nothing and how could I do that(talk to the ex) when I was having sex with her and sharing all these amazing times with her? And why I did it? And I have no clue what to say to her. I have apologized more than I have ever apologized in my life and admitted so many times that I really fucked up. I feel incredibly guilty. I stayed up so late last night and only slept a few hours because I couldnt stop crying and shaking because I was so scared of losing this girl. So reddit, give me some advice. I need the thing to make it better. Why did I do it and what do I do now?
<bot>: GF found messages to ex about intimate things, got mad, I dont know why I did it, what do I say and do?*