Doctors are far more depressed and stressed than other Australians, with a disproportionate number having suicidal thoughts, according to a major study.

Students and doctors aged under 30, particularly women, are at most risk of suicidal thoughts and mental illness, according to the survey commissioned by mental health charity beyondblue.

Oncologists are the most psychologically distressed specialists, while doctors who do not deal directly with patients think about suicide most often.

One in five medical students and one in ten doctors have had suicidal thoughts in the previous 12 months, compared with one in 45 people in the wider community, according to the report.

Based on responses to the survey, more than a quarter of doctors are likely to have a minor psychiatric disorder like mild depression or mild anxiety, which is much more than the broader community.

Although many doctors are embarrassed to admit they have a problem, they are more likely to seek help than the general population.

This is a good sign, says Dr Mukesh Haikerwal, former Australian Medical Association president and chair of the beyondblue doctors mental health program.

"It is a step towards removing the stigma from mental illness.

"Doctors are role models. They lead by example and will encourage other members of the population to seek help early.

"There is great resilience within the medical profession but doctors do fall into depression and anxiety and must get early treatment and intervention," he says.

The Roy Morgan survey, which was completed by more than 14,000 doctors and medical students, shows men work longer hours and engage in more risky drinking, but women doctors are more distressed and think about suicide more often.

Perceived stigma is rife, with four in 10 agreeing that many doctors think less of doctors who have experienced depression or anxiety.

Just under five per cent list bullying and 1.7% list racism as a cause of stress.

Kate Carnell, the CEO of beyondblue, says the survey identifies the challenges the medical community faces and outlines how they can be tackled.

"This includes initiatives such as a mental health strategy for the Australian medical community, guidelines around working hours and better mental health education in universities to reduce stigma.

"If doctors do not deal with the mental health issues they are experiencing it can affect their ability to deliver the best care," she says.