Whether you're healthy or if you have a mental illness, if you have someone to confide in, who cares and listens, you'll find it easier to deal with your problems. That reduces stress and prevents stress-related diseases, including depression. You feel valued by others. Close relationships make you feel valued and cared for. It increases self confidence.
Social support is a mutual process.
In your network, if you receive support from others, they feel needed and worthy because they can be of help. That increases their self confidence and self-esteem and contributes to positive mental health. The same benefits apply to us, when we are needed by others.