xcgb, you'll find the topic comes up on here fairly regularly.
I didn't deal with it.
My latest partner (having a father who had experienced a nervous breakdown) realised something was seriously wrong and gave me an ultimatum. That and the realisation that almost certainly I had been a life-long sufferer of bipolar disorder thanks to Stephen Fry's excellent programmes.
Saw local very understanding and sympathetic GP, diagnosed with serious bipolar disorder, GP offered to section me, which I declined. Immediately put on medication to reduce the severity of the mood swings.
Since moving to Norfolk (chance of pace etc.) had Cognitive Behavioural Therapy (emotionally hard work first, but probably the treatment that has helped me the most), and went on several courses (e.g. managing bipolar disorder, improving self confidence).
Would be fair to say I'm now a new man. I kind of feel like I'm a late emerging butterfly!
Do I still get depressed? Sure. I just cope with it far better, as does my partner.