Depression may seem like unrelieved misery to its sufferers, but the author of a controversial new book insists the condition is highly beneficial to the human species and can ultimately lead to great achievements.

In a new appraisal of the disorder, an eminent consultant psychiatrist argues that, far from being a modern malaise, depression has been with us for thousands of years and survived because it can give people an increased resilience to cope with life's challenges.

One in four of us will suffer from depression at some point in our lives, and one in 20 of us is currently living with it. In Britain the economic cost of depression in terms of lost productivity is enormous, around £17bn a year. Doctors are divided over why it is so common.

Dr Paul Keedwell, an expert on mood disorders at the Institute of Psychiatry in London, has written How Sadness Survived in order to understand why something that causes so much pain and disability has withstood evolutionary changes and still occurs so commonly.

'We see it as a defect - often patients see themselves as broken in some way - whereas I think of it as a defence mechanism. It has simply adapted in the human species to actually give us some long-term benefits.

'Essentially, depression can give us new and quite radical insights - it can give us a way of responding effectively to challenges we have in life. In its severe form it is terrible and life-threatening, but for many it is a short-term painful episode that can take you out of a stressful situation for a while. It can help people to find a new way of coping with events or your situation - and give you a new perspective, as well as making you more realistic about your aims.'

Keedwell says there is good evidence from long-term studies, particularly a recently published population survey of Dutch adults, to show that, after their depression, many patients seem to be able to cope better with challenges. 'For most, their vitality, their social interaction and their general health actually improved on recovery - and so did their work performance. I know from patients that it can also make you more realistic in your outlook; you develop more empathy to those around you.'

But the Dutch study also showed that there was a minority who became worse after the first bout of depression, particularly those who were socially isolated before the illness, or where there was a drug or drink addiction.

Keedwell suffered a bad spell of depression in his thirties. 'It went on for months, but I did come out of it, and I think I was a better doctor as a result. I certainly had more empathy with my patients. It also made me put my problems into perspective and I probably had a little more humility.'

The book describes the creativity of those who have experienced dark periods of depression, such as John Stuart Mill and Winston Churchill. Aristotle saw it as a state of immense moral and spiritual value because of the insights it could bring.

According to Keedwell, the strongest argument for depression's usefulness 'lies in its ability to force us to take stock of ourselves and ask: "Why have I allowed myself to become so frustrated for so long?" If depression did not encourage us to reassess things, we would merely return later to the same battle.'