I think it is about control.
Terminally ill people live in fear of a painful death and the uncertainty of what lies ahead.
People in debt worry about their future, will they lose their home and possessions?
People who have no job feel hopeless.
Those who care for a dying relative feel helpless to save them.
Social interactions help us to retain control over our lives. Loving parents, loyal friends, pets, partners, children, colleagues, so if we allow our social interactions to be dominated by one entity then we become vulnerable if something happens to them or that interaction breaks down.
I think most of what we categorise as "mental illness" could be cured by a more cohesive society and giving people more control over their lives. I think if somebody is aware of something that will bring them happiness and knows what they need to be doing at the lowest level then they will choose to do that over suicide.
I'm sceptical that drugs and "cbt" are particularly effective solutions although they may help in some cases.