Making visible progress motivates me to keep coding. When I'm not making apparent progress, it demotivates me to continue coding day after day, making it harder to actually open up the IDE and start programming.
One thing that someone else mentioned on these forums once (I forget who, or I'd credit them), and that has helped me alot, is to break coding into small tasks (which I was already doing) so they are more 'bite sized' and completable, and also to have a tiny task that is easy and simple to do already ready for you to code the next time you start up the IDE, to 'jump start' your 'making progress' motivational mindset. The 'completion' of each bite-sized task is motivating, but having that 'Oh, this is an easy task, I can knock it out real quick' task when you start up your coding for the day really helps me get into the programming groove.
I've been gone for 48 hours. What was I supposed to do next? Oh, right:
//TODO next:
//Change the maximum range of the "Starting animation frame" spinbox, based off the currently selected animation or tile tool.
//Shift the tile offset by holding some key and pressing arrow keys. Tile-offset should range from -48 to +48
I can jump right back in (both of those TODO's are relatively minor tasks - 5 minutes or so for each of them) and start coding immediately. It doesn't make the coding any less difficult, but it does get me back into the mood to wrestle those difficulties into submission.
Oh, and to master a skillset, you first have to travel through sucktitude to get there. It's one of the first stops, and the path you have to travel on seems to curve back into it quite frequently.
It's better to recognize that you still have alot to learn, then to think you've mastered everything.
========================
Psychologically, why are you anxious? What's causing the depression?
I once "shadowed" for a year a psychologist / christian counselor I knew (with a PHD in some major branch of psychology, and who was a licensed practitioner) who taught me quite a bit (unofficially) about things like depression and my own mental health. It was really helpful to me to work through my issues (and everyone has issues) as well as to observe and participate in some other people's sessions (with their permission). When I moved away from that area, thankfully some other members of my family, while not being professionals, are willing to discuss with me their issues and let me discuss with them my own issues. Anxieties, frustrations, anger, whatever.
I mean, honestly, just having anyone (a hired professional or even a close friend or family member) who's willing to sit down and chat with you, and just listen as you talk about your own issues can take alot of stress off of you. Giving voice to your concerns to someone who cares and who's paying attention can make those concerns, when spoken aloud, seem much less serious when put in proper context.