
I'm so sorry.
That's a horrible experience!
Sometimes, friends make mistakes when they've been drinking or doing drugs. I did have a friend who slept with my date one night, but that's as close of experience that I've had.
You and your ex-boyfriend were together about as long as you and your best friend. Had the two have any experience together before you came along? Were they friends or bf/gf before you got together?? If so, it's possible that they've been holding these emotions (or desires) for each other down for many years. That's about the only acceptable possibility that I can think of right now.
If so, perhaps you and your friend will eventually be able to let go of this hurt and confusion & be able to become friends again. In my opinion, most of that lies within you. You may never be willing to forgive your friend for this. But...hopefully, you will be able to let go of this pain and move on in your life.
Gentle hugs to you ~ I hope that your pain begins to subside soon.