WASHINGTON — He had just hung up the telephone with the devastated parents before heading in front of the cameras. Unusually emotional, President Obama declared himself “heartbroken” by the brutal murder of an American journalist, James Foley, and vowed to “be relentless” against Islamic radicals threatening to kill another American.

But as soon as the cameras went off, Mr. Obama headed to his favorite golf course on Martha’s Vineyard, where he is on vacation, seemingly able to put the savagery out of his mind. He spent the rest of the afternoon on the links even as a firestorm of criticism erupted over what many saw as a callous indifference to the slaughter he had just condemned.

Presidents learn to wall off their feelings and compartmentalize their lives. They deal in death one moment and seek mental and physical relief the next. To make coldhearted decisions in the best interest of the country and manage the burdens of perhaps the most stressful job on the planet, current and former White House officials said, a president must guard against becoming consumed by the emotions of the situations they confront. And few presidents have been known more for cool, emotional detachment than Mr. Obama.

Yet the juxtaposition of his indignant denunciation of terrorists and his outing on the greens this week underscored the unintended consequences of such a remove. If Mr. Obama hoped to show America’s enemies that they cannot hijack his schedule, he also showed many of his friends in America that he disdains the politics of appearance. He long ago stopped worrying about what critics say, according to aides, and after the outcry over Wednesday’s game, he defied the critics by golfing again on Thursday, his eighth outing in 11 days on the island.