Out-of-state nurses have provided a lifeline for hospitals needing to replace workers as they fall sick or need breaks. Some, seeing New York for the first time, said they were compelled to help hospitals in need. But they also said they were struggling with the grief of witnessing so many deaths and with being hundreds of miles away from their families.

Ms. Williams said she couldn’t stay at home after watching television reports about overwhelmed New York City hospitals. “My conscience wouldn’t let me do that,” she said. So against the advice from some members of her family, she packed her bags and said goodbye to her 8-month-old baby and husband.

During her first week at Bellevue Hospital Center in Manhattan, she found herself wondering, again and again, if she had made the right choice. Usually dispassionate, she shook the first time she entered the I.C.U., having never before seen so many sick patients unresponsive to treatment. She missed her baby. And, as nurses around her developed symptoms, she feared her own exposure to the virus.

During a recent shift, Ms. Williams saw nurses huddled in hospital corridors, sobbing, after a colleague they had been treating died from Covid-19. “I see them crying over this person they worked with for so long, and I’m just imagining my own people back home,” she said, breaking into tears.