History offers mixed lessons. Watergate obviously destroyed Richard M. Nixon’s presidency and even that of his successor, Gerald R. Ford, who was punished by voters for pardoning him. President Bill Clinton survived being impeached for lying under oath about sexual liaisons with Monica S. Lewinsky only after a Senate trial in which lawmakers opted against removing him from office.

Even a less sweeping, less threatening scandal can have a chilling effect on a White House. When Vice President Dick Cheney’s chief of staff, I. Lewis “Scooter” Libby, was indicted on a charge of lying to investigators about the leak of a C.I.A. officer’s identity, West Wing colleagues were demoralized. One later called it “the lowest point” of his White House tenure. And it led to deep tension between Mr. Cheney and President George W. Bush over whether Mr. Libby should be pardoned.

The key for Mr. Reagan and Mr. Clinton was convincing the public that they were not distracted by the investigations but instead remained focused on doing their jobs and serving the American people. In Mr. Clinton’s case, at least, it was partially an act — while he was able to effectively manage major foreign policy issues even at the height of the impeachment debate, in private he was consumed by the investigation, raged endlessly about his tormentors and at times seemed deeply distracted.

Aides found Mr. Clinton absently playing with old campaign buttons, and at a meeting with the Congressional Black Caucus, it fell to an adviser to conduct the discussion while the president’s mind drifted off. On another occasion, the head of the World Bank called a top White House official after a meeting with Mr. Clinton to say, “It’s like he isn’t there.” During a visit to the Middle East, an aide noticed Mr. Clinton trying to keep his mind from wandering off by scribbling on a yellow legal pad, “Focus on your job, focus on your job, focus on your job.”

Mr. Trump is hardly a model of political discipline, and keeping him focused has been a major preoccupation of his staff from the beginning. Ty Cobb, the White House lawyer overseeing the response to the investigation, has repeatedly urged Mr. Trump to keep quiet about it, with mixed results. John F. Kelly, the retired Marine general serving as White House chief of staff, tries to keep Mr. Trump’s day filled with meetings on policy issues but has yet to tame the president’s Twitter habit.

“To be sure, an event like this can be a drain on morale, especially for those who worked with and like General Flynn,” said Shannen W. Coffin, a former counsel to Mr. Cheney. “For the rest of the White House, it’s important not to get dragged down into the Washington speculation game, and that they keep their eyes on the ball on the president’s priorities in domestic policy, judicial appointments, national security and the like.”

Mr. Trump’s advisers say that is what they have done, essentially walling off the investigation as best they can under Mr. Cobb while most of the West Wing remains fixated on policy goals.