Scientists have identified genes which increase the risk of bipolar disorder, which may lead to new treatments.
Stephen Fry made a BBC programme about bipolar disorder
The findings, made as part of the largest study into the genetics of common diseases, also offers hope to depression and schizophrenia sufferers.
The Cardiff University scientists analysed DNA from thousands of people, including actor and writer Stephen Fry.
Previously known as manic depression, bipolar sufferers are at a greatly increased risk of committing suicide.
The team, from the university's School of Medicine, discovered that there are many genes which put an individual at greater risk of bipolar disorder.
Each gene on its own makes a relatively small contribution to the overall risk.
The results are said to shed light on the biological systems behind bipolar disorder, which affects about 100m people worldwide.
It is hoped the discoveries will enable better diagnosis of mental illness and lead to new treatments.
Some new therapies will involve drugs, but others are likely to include education, lifestyle advice and talk-based treatments.
WHAT IS BIPOLAR DISORDER?
Patients experience disturbances in mood ranging from extreme elation to severe depression
Delusions and hallucinations often occur during severe episodes
Causes extreme disruption to a person's life and relationships
Sufferers are at greatly increased risk of committing suicide
Professor Nick Craddock, who led the Cardiff team, said their studies would help scientists better understand the illness and help with the treatment of future generations of sufferers.
"This should be a time of great optimism for those individuals and families that have experienced illnesses like bipolar disorder, schizophrenia and depression," he said.
The team focussed on bipolar disorder as part of a £9m UK-wide collaboration involving more than 200 scientists studying 11 different diseases and analysing DNA from 17,000 people.
Significant findings on seven diseases, including diabetes, rheumatoid arthritis, coronary heart disease and Crohn's Disease have come from the studies, and have been published in the journals Nature and Nature Genetics.
Among those giving their DNA for the Cardiff team's research was television personality Stephen Fry, who visited the city in 2006 to discuss his own struggle with bipolar disorder for a BBC television documentary.