Avoid locking yourself away completely
Some people are so afraid of their own thoughts and feelings after a break up, that they become complete social butterflies, never giving themselves the time and space to deal with their own emotions. If this is you, slow down and make some alone time for yourself so you can get your head and heart back in order.
Give yourself time to heal
Shift your focus
Think of things you like about your life: your job, a hobby, etc. and try to concentrate on those for a while. If you can't think of anything you like about your life right now, then you can use this opportunity to start fixing those areas. Start a new hobby, take a class, work on ways of improving your living and working situation - anything that can get you thinking about things other than bad relationships.
Write through it
Take care of your body
(and the rest will follow)
It's tempting to drink a lot after a break up, eat a lot of unhealthy things or, alternatively, not eat at all (sometimes bad break ups make you lose your appetite). However, all these things come with a nasty cost to pay afterwards. Treating your body well, on the other hand, will generally pay off and help you feel better about yourself.
Make sure you eat regular, healthy meals with plenty of fresh fruit and vegetables and don't overdo the chocolates (although some are nice every once in a while!). This is one of those times when it pays to get (healthy!) takeaway food or eat out if the alternative is sitting at home, being too depressed to cook.
Exercise is a good way of making yourself feel better. The body produces feel-good chemicals (endorphins) after a work out and those are much better for you than alcohol. Always take care to not overdo it, though. It's easy to over-tense your muscles when you're angry or upset, which could end up causing an injury.
Light-moderate exercise is probably best, as well as those types of physical activity that calm your mind as well such as yoga, tai chi and other forms of martial arts, etc.
I am a great fan of alternative medicine and have had a lot of success with things like aromatherapy, homeopathic remedies and Bach flower remedies. Getting an aromatherapy massage (or any other form of massage) can be a really nice thing to do and some essential oils are particularly good for sadness. If you live in a big city that has massage schools, you can even sometimes go to the student clinic and get a really cheap or free massage.
Treat yourself
(if you can, you should!)
Be kind to your emotions
(and they'll be kind to you)
Get help if you need it
Things to make you feel better
(Work in progress)
Apart from flower remedies (listed below) the things that work best for me when I'm down are those that make me feel good about myself and,especially, my body. When you feel good about who you are, you know you have everything you need to find someone better. Working on your happiness from both the inside out (talking it out, writing, therapy) and the outside in (retail therapy, eating well, glamming up) is the best combination for getting your life back on track. The following list of links are a bit of both.