Researchers found that having friends can halve the probability of developing, or double the probability of recovering from, depression over a six to 12 month period.
The findings are the result of a study of the way teenagers in a group of US high schools influenced each others' mood. The academics used a mathematical model to establish if depression spreads from friend to friend.
"The good news is we've found that a healthy mood amongst friends is linked with a significantly reduced risk of developing and increased chance of recovering from depression," said Frances Griffiths, head of social science and systems in health at Warwick Medical School, University of Warwick.
They examined how their mood influenced each other by modelling the spread of moods using similar methods to those used to track the spread of infectious diseases.
More From This Section
The mathematical model used suggests that adolescents who have five or more mentally healthy friends have half the probability of becoming depressed compared to adolescents with no healthy friends.
And teenagers who have 10 healthy friends have double the probability of recovering from depressive symptoms compared to adolescents with just three healthy friends.
"In the context of depression, this is a very large effect size. Changing risk by a factor of two is unusual," said lead author Edward Hill, a mathematics researcher at the University of Warwick.
Social factors such as living alone or having experienced abuse in childhood are already linked to depression. Also social support, such as having someone to talk to has been cited as important for recovery from depression.
"It could be that having a stronger social network is an effective way to treat depression. More work needs to be done but it may be that we could significantly reduce the burden of depression through cheap, low-risk social interventions," said Thomas House, senior lecturer in applied mathematics from the University of Manchester.
The study was published in the journal Proceedings of the Royal Society B.