I know the exact situation you are going through, man. I was with a girl for a whole year and we broke up and made peace with each other throughout. And now she has a new man and I understand how you feel. More than most people I imagine.
It is overall quite simple to move on from things like this, the only difficulty is to actually execute a plan to move forward with your life.
Hopefully you can listen to some steps that I took - and hopefully you can find yourself someone worthy of your time and your effort. I will be sure to keep the list simple for simplicity sake.
- after reading your post, you mention how things were off and on between you two throughout your relationship. The first thing you must do is realise that this behaviour is toxic and is not a sign of a healthy relationship. If she doesn't respect you enough to stay with you, you shouldn't respect the idea of thinking about her.
- distract yourself with other tasks, for me, I turned to my love of tech and programming. By indulging myself with work and projects, I was able to keep her out of my mind and focus more on me and what I want for myself. You can replicate this by moving on and doing things you love. Maybe explore new hobbies.
- work on your network and meet new people. There is nothing better to keep your mind off of an ex girlfriend than finding a girl who is great and worthy of your appreciation. I managed to find a new person to care for who I believe cares for me. But, if you are not ready for this - make some friends and see who else this chat has to offer.
With these three things, I guarantee you will have no problem moving on and building a better future for yourself. Don't let your past be an obstacle.
Always here if you would like to talk.
Joseph.