Don't Try to Diagnose Yourself
I’ve seen a lot of positive discussion in the developer community recently about depression and mental illness. People are standing up to say they have suffered from depression and that it is nothing to be ashamed of. This is good.
My only concern is that developers (being developers) have a tendency to try to fix things themselves. A developer spots a bug, spends a bit of time trying to root cause it, and then applies a fix. This is also good, in a development setting, but it’s not so good when dealing with what’s going on inside your own head.
If you’re feeling the symptoms of depression, then for your own sake talk to a friend or, better yet, go and see a professional. You might be a great developer but you are an amateur when it comes to understanding how your own brain works. If you try to internalize it you are more likely to do yourself more harm than good.