The best solution to deal with negative emotional states is to fill up your time with activities that require high levels of concentration and/or effort.
Doing so will not eliminate the pain, but keep it constrained to your more "thoughtful" free time. And, if you do a good job at picking activities, like exercising and cooking for yourself, you may find that diet and fitness ride in with a wave of positive-emotive-state-inducing brain chemicals that will help you even out a bit. Surrounding yourself with friends, and focusing on the positive (rather than having a pity party) also does wonders.
Another great method that takes the sting from heartbreak is to fail utterly, completely, and seemingly-life-endingly at something besides love[*].
Forgetting is not an option, but eventually, the immediacy of the pain and the feeling of helplessness in an "active heartbreak" give way to more nostalgic, "nichevo-ey[†]" thoughts that can, in time, even be used to help surface the better memories around your various past loves.
[* This works in reverse, too: When I lost my job, I was devastated. When my dog died a few days later, the job didn't even return to my thoughts for weeks, and when it did it wasn't the cataclysm I had initially thought it to be.]
[† Nichevo is Russian for… Hell, I just can't explain it. What does the Russian word "nichevo" mean? to the rescue…? ]