It surveyed 108 gang members and found that half had an anxiety disorder, more than 85% a personality disorder and 25% screened positive for psychosis.
Exposure to violence was the likely cause of their mental health problems, it said.
Experts said opportunities to help young people were often missed.
The research team from Queen Mary, University of London, started by surveying 4,664 men aged between 18 and 34 in Britain.
Researchers included significant numbers of men from areas of the country with high gang memberships, such as Hackney and Glasgow East, from areas with high ethnic minority populations and areas of social deprivation.
From the total sample, 3,284 said they had not been violent in the past five years, 1,272 said they had assaulted another person or been involved in a fight and 108 said they were currently in a gang.Cycle of violence
The gang members and the violent men were found to be particularly prone to mental disorders and more likely to access psychiatric services.
Prof Jeremy Coid, lead study author and director of the forensic psychiatry research unit at Queen Mary, University of London, explained the likely cause.
He said the fear of future violence and victimisation led young men to experience extreme anxiety.
The study, published in the American Journal of Psychiatry, said: "Readiness to retaliate violently if disrespected, excitement from violence, and short-term benefits from instrumental violence lead to further cycles of violence and risk of violent victimisation."
The study also found that, of the 108 gang members surveyed, around a third had attempted suicide.
The authors said this could be linked "to the notion that impulsive violence may be directed both outward and inward".
However depression was significantly less common among gang members and violent men.
Andy Bell, deputy chief executive of the Centre for Mental Health, said they had carried out their own research in this area and found very high rates of multiple health and social issues in both boys and girls in gangs.
"It is very clear they have numerous problems throughout their lives, often related to drug, alcohol problems and maltreatment at home - and they all contribute to poor mental health.
"One vulnerability leads to another. The earlier they are dealt with the better - but sadly opportunities are often missed."Street therapy
Prof Coid agrees that healthcare professionals should be aware of gang membership when assessing young men with psychiatric illnesses in urban areas.
The study reports that although just 1% of 18- to-34 year-old men in Britain are gang members, in areas such as Hackney this rises to around 8.6%. Yet the average age of gang membership can be as low as 15, it adds.
MAC-UK, a charity based in Camden and Southwark, in London, targets the mental health needs of young people aged 16 to 25 involved in gangs and antisocial behaviour in a novel way.
Dr Charlie Alcock, chief executive officer of the charity and a clinical psychologist, says youth offending is a public mental health issue which requires a different approach.
"We support young people by taking mental health on to the streets and working with them in a place which is convenient and comfortable for them.
"We believe one in three young people has an unmet mental health need," she says.
These can range from stress and anxiety to hearing voices and more serious forms of psychosis.