Concentrate on work when you have personal problems..
jeromec: If you're a programmer this can be troublesome because a focused mind is what is needed to be productive, whereas you could get away with many other types of work while letting your mind wander. I think the best approach depends on the type of problem(s), but many problems, like emotional ones, may need time to get better. One thing I always try to remember is that nothing lasts forever - good or bad. This can be a comfort in bad times.A technique I use to be productive as a programmer is to try and finish a section of work in half the time. This mental demand won't let the mind wander. Promise yourself a reward at the end (such as being allowed to slack off at HN for a while ;). This works for both problems and procrastination, and can give you a positive boost for having accomplished a task. Try to break your workload (and problem solutions if possible) into smaller chunks to deal with, otherwise you can easily feel overwhelmed.