First loves

I dated my ex (first love) for almost a year. We were insanely in love but he had some self destructive issues and I thought he needed time to himself for a little so we took a break. Later on, he started talking to my “friend” and we broke up. Now they’ve been dating for a while now. I’m no longer friends with her but I’m constantly thinking about them together and I feel like she thinks she’s better than me :( how do I get out of my own head about this??