The suicide of Aaron Swartz has the Internet talking about depression: the psychic variety, not the economic kind.
The econ-blogger Noah Smith offers some valuable insights into the crippling condition.
I believe that many depressed people are constantly afflicted by the crushing negative feedback of a negative personal narrative. And I've found that the biggest single thing that helps people out of depression is the scrapping of the negative narrative and its replacement with a positive alternative narrative. This is usually possible, because narratives are mostly constructed out of bullshit - replace the bad bullshit with good bullshit, and you win. But that is much easier said than done.
If you have depressed friends, you can, in theory, help them construct a new, positive narrative for themselves. But this is a very difficult thing to do, because a coherent, believable narrative is a rare thing, and you never quite know what will stick and what will be rejected. The good news is, if you try and fail, your depressed friend will be no worse off. Remember, depressed people are weak-willed, they have low volition and little initiative; to help your depressed friend construct a new narrative, you have to be pro-active. You've got to spontaneously volunteer positive perspectives on his or her life, without being asked to do so.
This goes against our social instincts, since with a normal, non-depressed sad friend, doing this is kind of a mean thing to do; the friend just needs you to listen and understand, not to contradict, reinterpret, and dismiss their pain. But a depressed person is not sad, and what they need is very different from what a non-depressed sad friend needs. I'm not saying you should be an aggressive jerk, and berate your friends for thinking negative thoughts. Nor am I saying you should project fake sunny optimism about your friend's life. It takes a lot more honesty than that, not to mention finesse and creativity and careful guesswork about the nature of your friend's "negative narrative". So go slowly and carefully.