Others have already offered the more obvious advice, so I'll just add something a bit weird: I've started taking swing dancing classes and it's good fun. I meet people (some of which are women!) and it takes me out of my head. It's good active sort of relaxation.
I've noticed that a lot of programmers are into swing dancing, about 1 in 2 men I talk to at social dancing are in software in some way.