You can choose to avoid thinking about him or her and causing yourself suffering. It’s not easy, but you can do it.
A good way to think is by journaling about your feelings. It doesn't have to be the best writing or even good writing at all. Just get it all out there. Imagine that as you write them down, the bad feelings and thoughts are leaving your body and sticking to the paper.