Comforting the families of America’s fallen service members took a toll on President Trump — especially when the survivors included small children, according to a new book on the Trump White House.

The most striking of those experiences came less than a month into his presidency, when Trump traveled to Dover Air Force Base to meet the family of slain Navy SEAL Ryan Owens, who died in a special operations raid in Yemen.

Senior staffers attempted to prepare Trump for the intense and difficult experience of seeing the casket and meeting grieving family members, and the president struggled to process the heart-wrenching scene.

“No one said anything harsh, but there was a definite coldness that the president remembered,” one person said. “‘That’s a hard one,’ he said afterward. He was clearly rattled. He let it be known he would make no more trips to Dover.”

Officials recounted the incident to Bob Woodward for his new book, “Fear: Inside the Trump White House.”

The Washington Examiner obtained a copy of the book and first reported the story about Trump’s struggles with grieving family members.

In another instance, Trump made a phone call to family members of a fallen soldier, veering from the facts to offer comforting stories he believed the families wanted to hear, officials told Woodward.

“l’m looking at his picture — such a beautiful boy,” Trump said in one call to family members. “Where did he grow up? Where did he go to school? Why did he join the service?”

“I’ve got the record here,” Trump added. “There are reports here that say how much he was loved. He was a great leader.”

The book goes on to note that others in the Oval Office had copies of the records.

“None of what Trump cited was there,” the book says. “He was just making it up. He knew what the families wanted to hear.”

Hardest for the president, the book adds, were the families with small children.

“That had a big impact on him, and it’s seen throughout everything,” one source said.