I went out with a guy twice, he treated me like shit so I left him and now he moved on and My best friend is going out with him and I'm still in love with him
First of all, your best friend doesn't know whats good for her. If he didn't treat you right, he isn't going to treat her right. And second, you shouldn't love someone who doesn't treat you right! I know its hard when you have all these feelings who doesn't show the slightest for you, but you deserve better! Eh, scratch that, you deserve THE BEST! You need closure, and a new best friend.
first your best friend sucks because she's dating her "best friends" ex. Second your ex sucks for dating your best friend AND he treated you like shit.
You need to pick better friends and boyfriends, and you need to have some self respect and raise your standards. If those are the kind of people you consider your "best" anything, damn you need to sort out your priorities in life... which should be you.