I've known a couple of tech types (one dev, one a pm) that both found out that they were clinically depressed. They've both bounced back from it and are their old selves again.
Major depression is a serious medical issue and can happen to anyone... there's nothing to be ashamed of (and anyone who thinks otherwise is ignorant). Treatment is usually talk therapy and antidepressants (and usually some time away from work... expecting a sick person to be at work while they're undergoing treatment is plain wrong).
Googling "major depression" will show you lots of resources... but talking to your doctor about this is your first step (this can be tough... but you can do it). Don't put that off. Especially don't put that off due to worry about step 2 though N.
So... your 2 options are really 3: See a doctor!
Best of luck (and feel free to reach out and I'll offer what advice/help I can).