I totally can relate. In fact, as shown in the other comments, MANY can relate. Here's what I do..
##Instead of trying to write every single step of what must be done out, I instead focus on 3 things.
1) The end goal (So, I'm programming an MVP)
2) The most immediate step that I can take that will make progress AND NOT STRESS ME OUT. (Get the development environment set up)
3) Blocking out everything between #1 and #2 the best that I can.
How do you find #2? By taking whatever the end goal is, and splitting it down into pieces until you've identified a task that you KNOW you can accomplish without freaking out. #2 should be a decent amount of work, but the threshold of when it's too hard is when you don't want to do it anymore...in which case, you keep breaking the problem up.
The logic behind this process is not just a quality of life thing. It's an objective and reasonable way to accomplish things. By starting at the top and breaking things down, you've forced your mind to visualize parts of the process. Most importantly though, there is literally no reason to write out every single step because:
a) It will just freak you out.
b) When you complete this most immediate step, the whole landscape of what you need to do may or may not change.
c) You attain focus by just having one step instead of trying to keep your mind from thinking about 100.
For example, if you plan out to add a feature to remove a particular database item and THEN add a feature to change one you may run into a stress point. What happens if the first feature you go to add begets 3 critical errors that you must immediately fix? Well, now you're going to feel behind all day because unless those errors are quick to fix, you've still got step 2 ahead.
##Knock out 2 big things a day. Bonus points for more.
These two big things are whatever you define. I usually decide on 2 big things that seem of reasonable size, begin working on one, and adjust what those things are if need be. This may not seem like a lot... but if you do it every day. Like EVERY day. They stack up.
To pick up momentum, make those things smaller at first. As you get used to the process, scale them up.
##Check your thoughts regularly
If you start thinking depressive things.. smack your hand on a table really hard. I'll bet if you do that, you won't be able to think anything except ow. This is sort of a reactive thing. But really, whenever you feel a thought popping in, just try and edit it accordingly.
##Journal
This is really theraputic. Ask yourself questions in a journal and attempt to answer them.
Anyhow. I've used the above processes to build large scale apps. It also regularly helps me overcome any levels of depression. It's likely not the best.. but it helps me at least.