John F. Kelly, the White House chief of staff, delivered an emotional, personal defense of President Trump’s call this week to the widow of a slain soldier, describing the trauma of learning about his own son’s death in Afghanistan and calling the criticism of Mr. Trump’s call unfair.

Mr. Kelly said that he was stunned to see the criticism, which came from a Democratic congresswoman, Representative Frederica S. Wilson of Florida, after the president delivered a similar message to the widow of one of the soldiers killed in Niger. He said afterward he had to collect his thoughts by going to Arlington National Cemetery for more than an hour.

In a remarkable, somber appearance in the White House briefing room, Mr. Kelly, a retired Marine general whose son was slain in battle, said he had told the president what he was told when he got the news.

“He was doing exactly what he wanted to do when he was killed,” Mr. Kelly recalled. “He knew what he was getting into by joining that one percent. He knew what the possibilities were, because we were at war.”

“I was stunned when I came to work yesterday, and brokenhearted, when I saw what a member of Congress was doing,” he said. “What she was saying, what she was doing on TV. The only thing I could do to collect my thoughts was to go walk among the finest men or women on this Earth.”