You can't help how you feel and what has happened has already happened. Why did you break up in the first place? Was he not treating you right or were you not happy? The point is with him, it's a proven failure. You guys broke up because it wasn't working, and that is the fact that remains no matter how much time has changed or passed. He may have changed and grown a bit since, but you don't know that for sure. And since you can't be with both at the same time, you have a proven guy that is good to you and does treat you right. Or you give that up to be with somebody who was a failure, regardless of how high of a pedestal you put your ex on. The choice should be simple.
Do you not appreciate what you boyfriend offers? Maybe you should focus on doing something special with your guy or spoil him a bit for treating you so good. Focus less on the ex and more on what you have. It can be as simple as thinking of something to do for your boyfriend when your thoughts trail towards your ex. You have to make an effort. And if you think you are going to stray, you should cut off any and all contact for your own benefit.
Waking up next to a beautiful girl,
Step outside and say hello to my beautiful world.