For weeks, Mustafa Abutaha wandered the halls of one of Gaza’s few functioning hospitals and filled his days by volunteering to do whatever was needed — sweeping floors, baking bread, dressing injured patients, feeding dates or tomato sandwiches to those who couldn’t feed themselves. Anything to avoid thinking about his son, Muhammed.

As the Israeli military targeted the southern city of Khan Younis in early December and fighting with Hamas intensified, his family’s home was struck while he was visiting a neighbor, Mr. Abutaha said. His brother was killed. Three of his five children were injured. And Muhammed, 18, was found motionless in a stairwell.

“If somebody sends me his picture, I just shout at him and say: ‘Please don’t remind me of my son. He’s already dead. Please, I don’t want to bring back memories,’” Mr. Abutaha said. “Oblivion, forgetfulness, is a blessing from God.”

Soon after the strike, he said, he and his family fled to Nasser Medical Complex in Khan Younis, at the time one of the last facilities in the Gaza Strip still offering medical care and shelter to the displaced. Now, its operations are in peril.

This week, Israeli forces ordered the evacuation of the thousands of civilians sheltering at Nasser and, on Thursday, began a raid against what it says is Hamas activity inside the hospital. Hundreds of patients, staff members and displaced Palestinians had already fled, including Mr. Abutaha, though many remained.

Beginning in December, Mr. Abutaha, a professor of English, sent dozens of voice and video messages to The New York Times providing an unusually direct window into the struggle to survive inside an embattled Gaza hospital.