Games that make you feel better when your brainbugs, of any sort, are acting up. For me it´s the portal series and Q.U.B.E. I generally purrfur nonconfrontational puzzlegames, probably gonna buy Quantum Conundrum when I have money again. And yes, I am fond of portal-like visuals/mechanics.
Lately, it's been Harvest Moon for me. I can sometimes drown out repetitive harmful thoughts by focusing really hard on what I plan on doing next in the game: I get too busy thinking about upgrading my house or planting certain configurations of crops. Or Music Catch 2, which is a free flash game with very nice audio & rainbow colors.
It depends on the severity/kind of brainfail. If I'm overstimmed, little repetitive puzzle games like Ring Pass Not or any kind of match-3 game that gets me absorbed in problem solving/pattern making, reducing the amount of information my brain is trying to process at one time. When I need to get out of my own head, anything that requires a certain focus. Right now it's Far Cry 3 - trying to clear out pirate outposts without getting caught distracts me from just about everything. (Plus it's fun to set cassowaries on them.)
Anxiety stuff: Dyad. Having soothing music, pretty colors, concrete goals, and no huge consequences for failure really helps me. Depression: hack and slashes, for some reason.
Digital devil saga, for that particular brand of sullen omnidirectional hate depression brings up sometimes. Devouring your enemies is very cathartic, and i enjoy gale and serph's nope on emotions in general.