Maybe by doing something productive, a hobby or keeping yourself busy. But I do know some people that says that one has to wallow in sorrow after a break up... like something you can't avoid.
The pain should go away gradually. You'll might feel like shit for a long while, but it can only get better. Taking your mind off it in some way, like other people suggested, might help.