Sex complicates everything and usually ends badly, because the various parties invariably have different ideas about if and/or how it should end. Some people can back out gracefully, others need a clean break. There's no telling what is going on with your ex/friend, but it wouldn't be surprising if there were heavy things that you're unaware of. In any case, we've pretty much all been there, some of us many times, and like Bingo said, it's part of life (one of the difficult parts). If there is any consolation, it is that 20 years from now, believe it or not, you are likely to look back on it and see it very differently than you do now. I've been hurt really badly by my share of women, and in every case, after a decade or two later, I look back and only remember the good times.
The old saying is "time heals all". When I was 20 I didn't believe it. But at 54, I can say pretty definitively that it really does. So the best thing you can do is just get through it as best as you can while minimizing the collateral damage.
I know you didn't ask for advice - so apologies if my comments were unwelcome.