First of all, good job on taking a mental health break. I was burned out at this time last year and should have asked for a sabbatical, but I thought I could tough it out. I ended up having a falling out with my work and we parted ways. A few thoughts off the top of my head:

* Do a health assessment, maybe a physical/checkup, and address any digestive or sleep issues. I had undiagnosed sleep apnea for 10-20 years which lead to severe fatigue, then acquired IBS from (I think) a meat deficiency and lack of fiber while bodybuilding, similar to what vegetarians get after 3 years if they don't meticulously watch their nutrition. I thought it was leaky gut from a sensitivity to legumes and nightshades (Dr. Gundry has info about this) but in my case, I think it was that I had substituted legumes for meat so had worn through my gut lining and also wasn’t making serotonin from tryptophan in the gut. Anyway, I went heavy on the meat and took some prenatal vitamins for a week and my digestion and mood improved within a matter of days. It was honestly a miracle.

* If your physical health is fine, start working on your mental health. I just found out a few days ago that I probably have ADHD, after reading this article on HN https://news.ycombinator.com/item?id=22129777 about it. I also discovered that I have task anxiety felt as a pain between my chest and stomach when I need to do something I’m wary of (I thought I only had depression). Cognitive behavioral therapy (CBT) has helped, mainly that I acknowledge negative thoughts as they come in and then let them pass, similar to with meditation. And I use The Secret/Manifestation to take negative thoughts like “I so don’t want to help them fix their website” with “thank creation that another opportunity fell in my lap, even though I can only save the lead right now until I’m feeling stronger”.

* My guess is that you have too much emotional baggage in your head that hasn’t been garbage collected. It will take you a period of time proportional to however long something was scribbling the hard drive in your head to recover from it. In my case, I normally do PHP and mobile development, but learned Java and Ruby for projects within 6 months that filled my head with anti-patterns that I had long ago stopped using. So I was mainly fixing mistakes in the code which I never would have made, which severely taxed my motivation. I was also on call at night 1 week out of every 3 so wasn’t dreaming. So I got so discombobulated that I was reverse engineering tasks all the way to their beginning and realizing that the entire project would have to be rewritten to make any changes. That annoyed the client and dropped my productivity to 10%. I’ve also been through PTSD due to the death of a friend 15 years ago that I felt responsible for, so slipped back into very dark and negative thought patterns of the whole world being against me. Which I realize now is what happens when someone has doubts about or loses their faith - what we might call a midlife crisis.

* If decluttering your mind through meditation and perhaps counseling feels too overwhelming right now, you can start with your immediate surroundings. I just spent the last few weeks cleaning my home office and shredding paperwork from 15 years ago. I had worked through burnout to depression 6 months ago due to my girlfriend having me do a bunch of home improvement projects around the house which got me over my starting friction. But cleaning my surroundings got me from depression to anxiety as my todo list shrank enough that I could see the forest for the trees. My task anxiety was so crippling that I was going days between getting even one thing done. But I discovered that by separating the thinking from the doing by building my todo list during one time period and working through it during another time period, I was able to act as my own boss. That let me visualize where I needed to be long term and then get into the zone while tasking, because it’s easier for me to do what other people tell me. While burned out, we often lose our ability to self-start.

* I don’t really have a fifth point, so a here’s a bunch grouped together: forgive yourself, be patient with yourself in your recovery, know that you are not alone (literally millions of people in the US alone struggle with burnout and depression), try to have as many emotional free expression tasks in your life as analytical so that you can do something constructive instead of procrastinate, talk to others who are struggling like yourself even if it’s just online forums and chat rooms.

I would say that I am pretty much back to normal, but unfortunately I haven’t really programmed in months. I am really, really struggling with the idea of going back to work. I need to, but feel uncomfortable taking on a full time job right now. I’ve been looking at freelancing, but unfortunately freelancer.com and upwork.com are completely saturated with 10-25 (as many as 85!) coder applications submitted for every contract I’m interested in. I’m trying the gig economy, but it’s kind of the off-season right now where I live so am only making $50-75 here and there. I’m looking into non-programming work that doesn’t emphasize problem solving as much - perhaps CAD or copywriting. I’m eager to work and full of energy and ideas, I just.. can’t write code.. right now. I’m hoping to get my blog back up and write some in-depth articles about the logistical side of programming and ADHD/PTSD/burnout/depression/anxiety, about solutions for when technical hurdles are not the problem. I’m up for anything, if anyone is in the same boat or needs help writing/planning/designing something.