Even doctors aren’t immune.

Two out of five physicians (42%) are burned out, per a recently released Medscape survey, while 15% say they’re either clinically (3%) or colloquially (12%) depressed. Mid-career doctors are the most burned out — with about half aged 45 to 54 reporting burnout — and women report a higher rate of burnout than men (48% to 38%).

While the root of the gender difference is “complicated,” said NYU School of Medicine professor Dr. Carol Bernstein, a former president of the American Psychiatric Association, she offered some theories: “I think that women, in general, are the multitaskers,” she told Moneyish. “It’s harder for women to say no. Women are not in leadership; they tend to have less control than men … They’re juggling homes and families and children and they’re often at the low end of the totem pole.” (Just 15% of med-school department chairs are women, per a 2017 study, and female physicians are more likely than their male counterparts to make professional adjustments to meet responsibilities at home.)

Specialties bruised by the highest burnout rates were critical care (48%), neurology (48%), family medicine (47%), OB-GYN (46%), internal medicine (46%), emergency medicine (45%) and radiology (45%). The folks least prone to burnout: plastic surgeons (23%), dermatologists (32%), pathologists (32%) and ophthalmologists (33%). Among the 14% who said they were both depressed and burned out, OB-GYNs topped the list at 20%, followed by public health and preventive medicine, urology and neurology.

So what’s got doctors so burned out? More than half of the 15,543 physicians across 29 specialties blamed an excess of bureaucratic burdens like charts and paperwork; nearly four out of 10 said they worked too many hours. Twenty-six percent cited a lack of respect from employers and coworkers, and 24% each blamed increased computerization via electronic health records. Asked what could help cool off the burnout, 35% pointed to greater compensation and 31% wanted their work schedules to be more manageable.

Indeed, a heightened emphasis on electronic health records and regulatory burdens — and, as a result, diminished face time with patients — leave less room for “the joy, the meaning, the connection” physicians tend to derive from their work, Bernstein said. “People have gotten carried away with both the algorithms and technology at the expense of the doctor-patient relationship and clinical care.” The latter, she added, feeds the “meaning, purpose and connection in medicine that are the counterbalance to sometimes the sacrifices we make as physicians.”

As for the top coping mechanisms for burnout, half in the survey said they exercised, 46% talked to close friends and family and 42% slept. About one in five opt for booze or binge eating, and use of substances like marijuana, prescription drugs and cigarettes/nicotine products clocked in low on the list (1%, 2% and 3%, respectively).

The lion’s share of depressed physicians — seven in 10 — said their condition was colloquial, or the equivalent of “feeling down.” Nearly 20% said they were clinically depressed, while 6% said their depression came from “other” sources. The no. 1 factor driving both male and female doctors’ depression was their jobs; runners up were finances, family, romantic relationships and health.

While four in 10 who reported depression said their condition had no bearing on patient interactions, 33% said they were easily exasperated with patients, 32% admitted being less engaged with patients, and 29% said they were less friendly with patients. Five percent said they made errors that could harm patients, and 14% said they made errors they might not typically make. As for how depression impacts work relationships with coworkers and staff, 42% said they were less engaged with staff and peers; the same proportion said they were more easily exasperated.

“I believe if we have happy, healthy, satisfied physicians, we’re going to have happier, healthier, more satisfied patients,” Bernstein said. “It’s intuitively obvious: Wouldn’t you want a physician who’s happy and who cares about their work and feels valued taking care of you?”