You can either substitute your thought with an image, such as that of a loved one or you could simply think about a different topic such as your shopping list. Alternatively just focus on your breathing, feel your lungs take in air, feel it travel through your nasal passage.
[header] How to get over his past [title] Stop thinking about his past. [step] Sounds a little too simple but in fact its not at all hard. If you find your mind drifting towards his past or his ex try to think of something else.