First, don't force yourself to forget, it may be counterproductive.
Personally, I think it's normal to think of the past. This is the person I have loved for many years. When we broke up, it was because of such and such problems, but it doesn't mean that the sweet memories of the past are illusory, so I don't have to force myself to forget, accept everything calmly and admit that I just can't forget this fact. At the end of the relationship, people are most likely to fall into their own thoughts, especially when what they think is contrary to what they expect, and they will feel anxious. This is what I think will happen. The more I want to forget myself, the more I fall into self-contradiction, and inexplicably fall into the feelings of hatred, pain and confusion that I shouldn't have. When people commit crimes, things that they don't want to appear will appear more.
Second, divert attention and forget through time.
Instead of thinking about why you always think of the past and when you can forget these problems every day, let yourself see the world in a different place and in a different mood. Therefore, I personally feel that it is better to divert attention at this time, whether traveling alone or setting a new goal in life and working hard for it, than to think about it. Focusing on your own life, seeing the outside world more and listening to different people's ideas may make you suddenly enlightened. The world is big, but I am small. These things can be big or small, depending on your choice.
So personally, don't force yourself, let yourself embrace life again and find personal value. Everything in the past may be a beautiful memory or it may be worthless. These don't need to be explored, and time will tell.