I burned out a few years back, really bad. Like my nervous system partially shut down for a while because I pushed myself too hard. Thankfully I had good benefits and came back (after I stubbornly took my time and over a year off). Working as a programmer didn't help, it turned out my source of the problem wasn't work, work just exacerbated the problem. I'm doing fine writing code again, trying to keep my health in check. I'm trying not to make this a life story.
In my journey I learned that that there are different kinds of health. I figured out three on my own, but was serendipitously visited by an "expert" one day who gave me what I call The Bar Napkin of Health. A pie chart with six kinds of health: Mental, Emotional, Physical, Social, Occupational/Volitional and Spiritual.
I was in a state where my mental health bottomed out to zero. The difficulty is these things are all interconnected so it gets complicated. My physical and emotional health wasn't too far from zero either, so it's better than having a heart attack or becoming a psycho. I ended up helping a lot by improving my physical health first (was overweight, addicted to soda). Also improving my social health (becoming a barfly in a small town, making new friends) helped me out emotionally very well. I learned a lot. And I had good friends before I burned out, but social health needs updating sometimes.
My point is, is when one kind of your health approaches or hits zero, it drags the others down, and it accelerates. The worse it gets, the worse it gets.
I would classify myself as a typical good talented programmer, who given enough time can make any piece of code work, wether I wrote it or not.
So my question is to fellow employed programmers, how do you keep your mental health in check when you are stressed or overwhelmed? Weekly visits to the bar? Crawl into your cave of solitude for music and games? Exercise/competition? Faith in your work or outside of work? Or is coding so easy you never stress about it? Zoloft?
Another good question is what are your warning signs you look out for? Talking about work too much at lunch? Oversleeping and still feeling tired? Suicidal thoughts? Blood pressure so high you can bake with your forehead?
Another related question, is have you found therapy to work? I need to complain about my problems to people who understand them, which is usually my co-workers, so I don't think it would be effective for me.