In DBT we learn about distraction, distress tolerance, and self-soothing skills, to name a few. Also radical acceptance, when you can't do anything to change a situation. Can you try to anything to distract yourself, like pursue other activities, especially ones that you enjoy and keep you mentally thinking about something else? Exercise, painting, working, helping others, reading, to name a few. Can you tell yourself that your feelings are normal, and that they will change? You are not your emotions! You can accept the reality; you don't have to like it. It's not easy to do the above!!!
Self-soothing is always good: go for a walk, listen to music you like (but not if it reminds you of him), get a massage, eat comfort foods, do things that make you happy. Try to switch gears totally when you start thinking about him to distract and soothe yourself.
I hope some of the above helps you.


