Hey there, I'm a developer, I live in NYC and speak about this stuff sometimes (baugues.com/depression). If you're in NYC, would be happy to grab coffee next week.
As one more piece of the puzzle, since you mentioned several times doing you best work at night and it being hard to get up in the morning, I can wonder how much of various stresses for many people may come from perhaps being a night owl in an early-morning lark business culture?
Also in one study, even just one night of missed sleep can lead to bipolar cycling in some people -- discussed by Matthew Walker in his book "Why We Sleep: Unlocking the Power of Sleep and Dreams".