I just went through the same thing last summer, with my girlfriend of about 3 years at the time. I knew it was coming, it was just a matter of when. When just so happened to be 3 days before my birthday.
Long story short, I did something I would normally never have done. It ended up in me having a record, and not a good one. I lied to her about it, as to not hurt her so I thought. She believed my until I went to the investigator's office, I figured that if I kept up the lie I was fucked moreso, so the truth came out, and she was shocked to find out what I was capable of. About a month later it came. I took it well until she left that night, then it hit me like a ton of bricks.
Well I turned into the biggest asshole after that. Anytime I heard the new guy's name I'd be a dick about it. I hated the thought of anyone else being with her. Turns out he was screwing around with the chick he left to be with my ex, my ex found out and basically hasn't spoken to him since.
Before my incident we weren't getting along nearly as well as when we met. Every other time we saw each other ended up in arguement. I loved her, she loved me, but for some reason that's how it went.
We decided to be friends afterward. From the time we met she was my best friend. I hated the thought of losing the best damn friend I'd had. It was hard at times, but somehow I dealt with it. Ever since she left that asshat we've been getting closer again. Hell we might as well be back together now.
It may be possible to remain friends, just as long as you don't dwell on the fact that she's not with you anymore. That's where I went wrong. I'd say if you want to work things out, sure give it another shot, but if it doesn't work out, just leave it at that.