I'm a horrible person

I've been with my boyfriend for a year and a half and I love him so much but I always think about my ex that cheated on me, especially if my boyfriend does something wrong. I think about my ex at least once a day and I know I wouldn't go back with him, but I don't understand why I can't get him out of my mind. I'm sorry I just had to let this out. I can't tell anyone, they'd think I'm crazy for thinking about the guy that destroyed me and made me sick. I fell into a deep depression when I was with him. I cut, I starved, attempted suicide, but after all that, almost 2 and a half years later,  I still can't get him off my mind