First of all, thanks for caring about people.

Don't feel nervous about wanting to do something to help, and not knowing exactly what or how. Compassion isn't the same thing as knowledge, any more then thinking programming is cool is the same thing as understanding Hoffman coding.

This is a rare topic that my bachelor's degree in psychology can maybe help me answer on HN. The sort of thing you are talking about is something that the practice of community psychology addresses.

Incidentally, when I say you hereafter, I mean people interested in working towards dealing with the issues you raise, including stakeholders.

There is nothing wrong with exploring the idea of helping depressed hackers. Let me get that out of the way.

But you don't necessarily know the best way to help. And you don't want to dictate what is best, without understanding things from different perspectives. And you don't want to be treating the individuals if there are broader root causes or issues.

Community psychology would suggest you should consult multiple stakeholders, and build for the community in an iterative way, using empirical data to develop best practices. Just like A/B testing for your website change, you want to know if you are helping things get better, and by how much, and how you can optimize even more.

So, multiple stakeholders...
Stakeholders include:
depressed hackers,
families of depressed hackers,
friends of depressed hackers,
people willing to offer support/money/time,
therapists and other mental health professionals,
companies employing/funding hackers.

Possibly insurance companies and local hacker groups.

All the above can be involved, can help, or hinder, have resources, and desires.

You also need to step back and think hard about what you see the issue. The problem you think you want to solve needs to be touched on by those stakeholders, as well as seeing what resources can be offered. To some extent the solution should fit the resources, but it's also important that the solution fit the problem.

You need to make sure you are solving the issue at the right level. Are there systemic causes, or barriers to help, that go beyond a single individual? Who can help change those, if they exist.

You can try to help the individual deal with their environment, but that's just first order change. It may be more helpful to change their environment. Instead of addressing people when they are hurting the worst, can we prevent some of the harm they experience so they hurt less?

Like if there is a stigma associated with mental health issues, addressing that with education could help people get treatment. If the pressure to produce code and work long hours makes increases anxiety and depression, that can be addressed as well.

There also may be regional differences. I believe the UK has national mental health care coverage, right? The U.S. doesn't sadly.

My point being, don't just think about helping a person cope with how things are. Think about how we might change how things are so it's easier for such people to cope.

Anyway, I hope that's helpful in your process. I want to encourage you. Go ahead, try something. Maybe start a discussion site or mailing list on the topic. Start small and prepare to shift your understanding and focus more then one time.