No one has been able to explain why doctors, as a profession, have the highest suicide rate of any profession. Every year, between 300-400 doctors take their own lives. In the general population, males commit suicide 4 x higher than women. But the suicide rate among male and female doctors is the same. Female doctors take their lives at a rate more than twice that of the general public.
There is really very little research done on this subject and most of it is old. The most definitive study was done in 2003 and published in JAMA. It stated that undiagnosed and untreated depression is the problem and even when physicians seek help for depression, they are not treated aggressively.
Mental illness still has a stigma in our society. Doctors realize, with good reason, that if they admit to a mental health problem they could lose respect, referrals, income and even their licenses. Doctors have access to drugs that can mask their symptoms without getting help and that may make the situation worse.
If depression is considered something shameful and secret, that can further lower the self confidence and self-worth of a professional which exacerbates the depression. Medicine is a pretty macho profession. It is rare for physicians to even admit they get a "cold" let alone a serious illness. It is a point of pride to admit you can function on little sleep or work without taking time for rest, food or friendship.
There are no easy answers to this problem, but educating medical students about depression and how to deal with their own emotional health might be a start. The American Foundation for Suicide Prevention has information and has created a documentary called "Struggling in Silence" about physician suicide.