WASHINGTON — He joked with ABC’s George Stephanopoulos after filleting him in public, brought up a recent “60 Minutes” episode with CBS’s Scott Pelley and shook hands with Jake Tapper of CNN, the cable network that the commander in chief loves to hate.

All presidents lunch with major news anchors. But this week’s White House gathering was different. The president kept his guests 30 minutes beyond the allotted hour, was gracious and spoke so much that he left his peekytoe crab salad untouched — a recognition, those close to him say, that he must sell himself to the Washington news media because he believes the people who work for him cannot.

Mr. Trump, after all, had conceded only the day before on national television that “in terms of messaging, I would give myself a C or a C-plus.” In the same interview, on “Fox & Friends,” the president described his press secretary, Sean Spicer, as “a fine human being.” The language struck close Trump associates as a dismissive turn from a man who relishes hyperbole.

Christopher Ruddy, the chief executive of Newsmax Media and a longtime friend of Mr. Trump who visited him in the Oval Office on Wednesday, said that the president was experiencing “a lot of angst” about his negative coverage. But Mr. Trump, he said, was feeling energized after his speech to Congress on Tuesday. “He said to me, ‘People tell me that it was the best speech I ever gave,’” Mr. Ruddy said. “He seemed really pleased.”