1. Set aside some time for grieving. 2. Then find activities and events to keep you busy and focused, involved with other people so that your thoughts don't keep returning to the prior person.
Get out of the house. Try to reconnect with old friends who were there for you before you started dating this person. Listen to positive music. Exercise or pursue a hobby that enjoy.
If you are the one who was broken up with, I would suggest taking things slowly for a while. Avoid doing things that would remind you about the other person (or the break up at all for that matter). And no sulking!
The easiest way to deal with a breakup is to find someone else as fast as possible. This way you can have someone else to spend time with and take your mind of the person you were just with.