His first day at Woodhull, Dr. Sanchez felt lost: Where were the supplies? The nurses seemed tough. Reading the charts of patients with multiple complications — diabetes, heart attack, sepsis — “I was overwhelmed,” he said. Yet over the next eight weeks, as he learned new skills, from how to talk to a dying patient’s family to how to diagnose a stroke to how to work as a team, he caught glimpses of the doctor he will become.

For Dr. Sanchez, this past summer was a return to life: In February, his two-year marriage, to a young American woman he had met on a medical mission in Guatemala, suddenly unraveled. They separated in March, and a few months later Dr. Sanchez filed for divorce. “It felt like everything was collapsing,” he said. “You go through a kind of mourning.”

At Woodhull, Dr. Sanchez immediately found a mentor in Dr. Joaquin Morante, a bearded second-year resident with a long, affable face. Dr. Sanchez was impressed by “how he treats people in general,” he said, and by Dr. Morante’s independence: “He takes his patients’ blood samples himself, changes their dressings. If a resident complains that a nurse is too slow, he says, ‘Then do it yourself!’ ”

Dr. Sanchez discovered that he liked night float, the 8 p.m. to 8 a.m. shift, with its kaleidoscope of patients and problems. That speaking Spanish with his patients made him feel like he was home. That a can of tuna or a plate of spaghetti could work as breakfast or dinner. And that earning his first real salary as a doctor, $55,800 and a discounted MetroCard, felt good.

A runner, he liked to take off from his desolate block in Bedford-Stuyvesant, where he shared an apartment, and head toward the hospital. He would often call his mother, Beatriz Ramos, 47, a barista in Tampa, Fla., on the way. “My mom is my hero,” Dr. Sanchez said.

Ms. Ramos was a rebellious 15-year-old when she conceived Dr. Sanchez after running away with his father, her first cousin. At 19, she gave birth to Dr. Sanchez’s sister, Maria José, who was a few months old when she was operated on for strabismus, misalignment of the eyes. “There was a problem with the anesthesia,” Dr. Sanchez said. “She was deprived of oxygen for five, six minutes, and coded. The doctors told my parents she would never see, hear or walk.”

“She never gave up,” Dr. Sanchez said about his mother. His sister, now 27, works in Guatemala City. Raising Dr. Sanchez and his younger brother, now an engineer, his mother was strict, with enormous expectations. “I was terrified of her,” Dr. Sanchez said, smiling. “Now she’s my best friend.”