The toxic way is to either blunt feelings with narcotics (Benzodiazepine) or replace feelings of reward by excitement cause by drugs (Ecstasy, Cannabis). Most important among Caucasians is alcohol that works in both directions.
The psychological way is to treat the former partner with hatred or sardonically. There are even social events established to help to create that kind of mood. Divorce and B.I.G. (bitch/bastard is gone) parties.
I prefer sports and hard working, the physical way to get my feelings under control.
All three have their drawbacks. Toxic substances cause emotional blunting which extends to other feelings too. As those feelings are so important to communicate socially, in the long run, psychedelic drugs lead to social isolation and create psychological and physical dependencies.
The same is true to seeking psychological distraction. Hatred can consume all of your brain activity. You may end up hating all and everything which like drugs causes emotional blunting and social isolation.
I restrain from drugs and hatred. On the contrary, I try to keep all my feelings so precious to me. I do physical training which is good for someone who spends most of his time in front of a computer screen. It does not trigger physical decline. On the contrary, muscles begin to grow and health stabilizes.
As with hard working, physical exercises provide a rewarding system that can overrun the negative emotions caused by unfulfilled love. In fact they can even replace. After such exercises, I have the mock feeling of still being in a happy love affair which is untrue of course and which desperately and absurdly keeps me trying to win her back.
And there is an other draw back. You have to increase dosage steadily from once a week to every day, from a few minutes to many hours. I wonder if this eventually leads to physical dependency too. I have to be careful. I have to stay observant.