Or someone who has severely lost track of perspective.
You know it's done well when you really can't tell.
Posting self-loathing material is subtle for someone to come along and pick up their shoulders. They know what they're doing is unhealthy or irregular but won't outright admit it because it shows weakness. "My life sucks but I march on and continue to produce acceptable deliverables" is a pride thing.
tl;dr - start slowly, admit that you can improve your life and STILL churn out those code snippets and you'll find yourself happier!
I had been working way to much for the past 4years, and on the months leading to the melt down, it was just unhealthy, and i kept going at it, using drugs to keep up (i am deeply ashamed looking back...), barely sleeping and eating. And slowly it creep up on me, until i completely lost it. By my foolish attitude, i had not only burn myself (its been a month, i haven't been out of my place, i haven't written a line of code - i tried, but just the sight of it makes me sick -), but also hurt my co-workers and company, who in the process have lost their Chief Engineer and probably the project i was working on as well -months of work, and in the 6digits investment-.
There are people you can talk too, if it's not friends, professional help is there, i know how hard it can be to admit you've screwed up your life and health, but for your own sake, go get some help, before it is too late.
Because when your mind says stop, it'll be past the point where you can fix this "easily", and you'll be stuck with your decision for months, may be years. Take control of your situation, before your mind does it for you...
I definitely need help, and I know it, but in the UK, the social stigma attached to seeing a mental healthcare professional exceeds that of going insane.
You're literally killing yourself. You just don't know it yet.