Same thing happened to me OP, a little over 4 years ago. My then-gf, whom I've known to be bisexual before I got with her, ended our relationship to be with another girl. It was absolutely heartbreaking, more-so when you have to provide reasons for the breakup to your friends. They either say "fuck them both man!" or "damn dude were you THAT bad?" It's annoying.
Baring the first couple of months after the breakup, we remained great friends throughout the years. She officially had 3 gfs since, with that first one last a little more than 2 years, so she was serious about it.
One thing I can tell you is that while it does hurt bad, there's nothing you can do about it except treat it like any breakup. Just go out and meet new people. I learned that I had no control over her sexual preference and that it was inevitable that she would turn the way she is. It still stings...but now....
Ironically, around the time of your posting, I was on the phone with her and she revealed she now has a boyfriend. Color me fucking confused and fucked up now. I don't know what to make of it as part of me is extremely fucking jealous and I have no idea why. Hopefully this doesn't happen to you, but this is just another chapter in an already screwed up story for me.