RIO DE JANEIRO — The patient was dead, a rare bed was open, and the ambulance operator was on the phone. For Lara Kretzer, it was time again to choose.

“We have 15 patients ready to transfer,” the operator said.

Kretzer, a physician at the Florianópolis hospital, froze. The hospital in southern Brazil had only two openings. Thirteen people were about to be turned away — and probably die. And she would have to live with the weight of that decision.

“I don’t know how this will affect me in the future,” Kretzer would say.

In Brazil, where the coronavirus is still surging — daily deaths hit a record 3,251 Tuesday — this is now the life of a doctor: an unending succession of life-or-death decisions, and grappling with the associated mental trauma.

Brazil, which has buried more covid-19 victims than any country other than the United States, is suffering a health-care collapse. In three-fourths of state capitals, the critical care system is at greater than 90 percent capacity. There are vanishingly few places anywhere in the country to transfer patients. Hospitals are facing shortages of oxygen and the medications necessary to intubate patients. Intensive care units are so overwhelmed that victims of other emergencies are being turned away.

Now the country is running out of doctors, too. The failure to hire more has undone expansion plans all over the country, placing more stress on already overburdened health-care workers. As the virus kills about 2,300 Brazilians every day, the people charged with maintaining the faltering health-care system say the daily toll has pushed them to their limit.

In recent weeks, doctors have pumped lungs manually with silicone valves. They’ve watched patients suffocate to death. They’ve seen waiting rooms transformed into halls of misery, where the dead have gone unnoticed for hours. And they’ve made painful decisions to leave behind the elderly and the dying because others have a greater chance of surviving.

In countries all over the world, the pandemic has inflicted what health-care advocates call the “mass traumatization” of front-line workers. But the extraordinary conditions in Brazil — the duration of the pandemic, the extreme shortages of supplies, the hapless government response, the apathy and disregard expressed by some Brazilians, the sluggish vaccination campaign — have left doctors and nurses feeling trapped. No one knows when this will end, or how.

Researchers in one recent study found that nearly 9 in 10 health-care workers reported being “emotionally shaken” by working conditions during the pandemic. Other researchers said more than half of respondents in Ceará state presented indications of mental illnesses, including anxiety, depression, insomnia, suicidal ideation and signs of post-traumatic stress disorder.

“I’ve worked in Iraq and in Afghanistan,” said Renata Santos, board president of Doctors Without Borders-Brazil. “I’ve worked in regions where there were active conflicts. But what I’m seeing in my colleagues’ reports who are working on the front line with covid is something that we’ve never seen.”

In Florianópolis, Kretzer went through the list of patients with the ambulance operator. She’d just watched a patient die who should have lived. But someone sicker had been prioritized. Now both were dead, and here was another wrenching decision.

This time, she didn’t prioritize the gravest among them. She focused on those who had the best chance to survive. She picked two, hung up the phone and got back to work.

She doesn’t know what happened to the other 13.

No more doctors

Since the novel coronavirus hit Brazil, the health-care system has struggled to withstand the onslaught. Hospitals have run out of ventilators, beds, oxygen. Some have had to craft their own rudimentary breathing masks.

But this year, as a second wave of covid-19 rose and lines of patients backed up again, officials complained of a new problem. The public health-care system had the beds but had not hired enough health workers to care for patients in those beds. In Bahia state, 60 available beds were sealed off. In Rio city, around 600 beds — nearly half of the capacity in the federal network — couldn’t be opened.

“We’ve increased the number of intensive care units and hospital beds,” Romeu Zema, the governor of Minas Gerais state, told reporters this month. “But now, we’ve gotten to the point in Brazil where there aren’t any more doctors.”

César Eduardo Fernandes, the president of the Brazilian Association of Medicine, said the country badly underestimated the complexities involved in expanding health-care capacity to handle a deadly virus. “It isn’t enough to put down some money and open hospital beds, find space in the hospital and put in ventilators,” he said. Rotating in untrained doctors also won’t cut it, he said. Intensive care units will chew up most physicians.

“Intensive care workers are trained emotionally,” he said. “They live with death and people who are critically ill. But even they are exhausted physically and mentally.”

Public health analysts now warn that one crisis is fueling another. A hospital psychologist in northeast Brazil said her patients complain that they can’t stop hearing the cries of their patients, that they’re having panic attacks, that they feel powerless, that they can’t go on.

Another psychologist, who counsels medical workers in southern Brazil, said appointments tripled in 2020, with many presenting what she described as “moral distress.”

“It creates a great sense of guilt among health-care workers,” said Rita Prieb, the psychologist at the Clinical Hospital of Porto Alegre. “They think, “I chose one and left behind the other.’ ”

For Diego Vieira, a doctor in the northeastern state of Ceará, it was a choice in February between a young man in his 20s and a woman older than 90. He was working at a countryside clinic that had run out of resources. Both patients needed to be intubated, but the hospital in the capital of Fortaleza had room only for one. The younger person had the better chance of surviving. So Vieira made his choice.

“The problem was explaining the situation to the family,” he said. “They threatened to sue me for leaving behind their mother to die.”

Every night brings nightmares. He sees the young man, weeping over the death of his mother, whom he had infected after partying with friends. He sees the patients in the hospital hallways, on the hospital floor, in plastic chairs. To watch someone die of covid-19 without adequate care, he said, is terrible.

“Only people who have seen it know,” Vieira said. “The patient dies, drowned in their own lungs, begging for air, looking at you with desperation in search of help. But if I don’t have oxygen, how can I help?”

“And then, imagine spending 24 hours on a shift, only to leave the hospital and see people on the streets — drinking, talking, getting together in big groups, as if nothing is happening.”

‘I’m on the precipice’

It went against everything she thought she knew about herself, but Duana da Frota Araújo felt she had no choice. She was about to snap. Scary thoughts had invaded her mind. It was time to go home.

Araújo, 29, was only four months on the job when the disease crashed into Fortaleza. It opened a chasm between what she had expected her career to be and what it suddenly was. She hated to see the suffering, but what bothered her most was her inability to do anything about it.

She told herself doctors could at least give patients a comfortable death. When the ventilators were unavailable, there was always morphine. But then came an older man with pneumonia and heart problems. Her hospital didn’t have the equipment to intubate him, so Araújo prescribed an opioid. But that, too, was depleted. The equivalent of Tylenol was all that was left.

“All we could do was hold up a phone so he could say goodbye to his family,” she said. “I felt completely helpless.”

She stepped away from her job. She tried to return to work, once, but anxiety came surging in and she left again.

“I want to go back,” she said. “I want to save lives for the rest of my life. But this terrible mental stress — I’m on the precipice.”

That’s how one doctor in the Amazonian city of Manaus felt in January when the oxygen ran out. Everyone in his hospital — doctors, nurses, nurse technicians, physical therapists — rushed to the intubated patients, who were suffocating. They pulled them free of the mechanical ventilators. Then they affixed bag valve masks, and began to pump air into their lungs by hand — squeeze, release, squeeze, release — for hours.

“It’s tiring; your hands begin to cramp,” said the doctor, who spoke on the condition of anonymity because he wasn’t authorized to comment publicly. But he couldn’t stop. The patient would die.

“Think of what it is to compress this bag for two consecutive hours,” he said. “It started at 5 a.m., and I went until 7.”

Some days it’s difficult for Renan Jackmonth, another Manaus doctor, to believe what he’s seeing. One patient was his age: 36. Dead. Another was his cousin, “in the prime of his life, full of plans.” Dead. Another was the relative of a colleague, “100 percent of his lungs compromised.” Dead.

Every day, he is bombarded with more pleas. In hospital halls. Desperate messages on his phone.

“My father needs a hospital bed.”

“Tell me about my wife — we have two kids.”

“My uncle needs a bed.”

There was a time he felt only empathy. Now it is flecked with irritation. Who hasn’t lost someone? he thinks. “Who doesn’t need something?”