WASHINGTON — Over the past week, as Senate Republicans feverishly cobbled together their doomed health care bill, Chuck Schumer, the Democratic leader, made several quiet visits to the private “hideaway” office of John McCain, Republican of Arizona, near the Senate chamber on the Capitol’s first floor. Senator McCain, who recently received a brain cancer diagnosis, was nervous about the bill, which he thought would harm people in his state, and elegiac about members of his storied family, reminiscing about them at some length.

During those visits and in several phone calls, Mr. Schumer, who had led Democrats in a moment of prayer for Mr. McCain, assured him that they would have the 80-year-old senator’s back in his quest for bipartisan legislation should the health repeal fail — including making sure Mr. McCain’s beloved defense bill was passed.

“To me it was poignant,” said Mr. Schumer, who choked up on the Senate floor early Friday when talking about Mr. McCain. It was Mr. McCain who cast the decisive vote that led to the health care bill’s demise.

“It reminded me of going to Ted Kennedy’s hideaway and talking to him when he was ill, when he would show me pictures on his wall,” Mr. Schumer said, recounting the week’s visits to Mr. McCain’s office. “I had a lump in my throat several times.’’