This seems to be a norm in the younger generation......How long were you dating her? How did the romance between them started and what was her reason for dating your best friend? With this information I can give you better advice.
Neverthless, I would treat it in love, just be yourself. I would also get involved in a hobby eg. working out, biking, maybe taking up a class in an instrument that you might like, eg. panio, drums, guitar etc. maybe even singing lessons do something that will take your mind off of them and keep yourself very busy. Now I would forgive yet I would be cautious with your next girlfriend and keep your eyes open in your relationship.
Sometimes good friends hang out to much with their girlfriends and the relationship gets to close that it can lead to deeper feelings.
Yet, she left you for him so accept it and move on. If she really loved you she would not lay eyes on someone else. Also maybe she was lacking something in your relationship that she found in him. You really need to examine the relationship and see what went wrong so you can be more attentive and careful for you next relationship. It's not just how you should handle what happen, but try to figure out why it happen. This will show you your weak areas in a relationship and you strong points.
So take a piece of paper and jot down all you could remember neg. & pos. so you can learn how to handle woman. This will open your eyes to what should and what shouldn't be done in a relationship. Many times we focus on what happen, yes, but why did it happen to begin with. So just be a nice person and use caution for the next time. Let me know how you make out. Blessings, Yolanda