Still, with his tour of Switzerland complete, Federer looked as if he might still be reeling when he returned to competition at the tour event in Cincinnati this month. There, he lost to the young Russian Andrey Rublev in straight sets in only 62 minutes in the round of 16.

Those who know Federer well say that he has an uncommon capacity to reboot and rebound. And as he prepares to begin his 19th U.S. Open on Monday night in Arthur Ashe Stadium against the qualifier Sumit Nagal of India, Federer, 38, indubitably has more experience than just about anyone in navigating the peaks and troughs of professional tennis.

“I’ve never met anyone who does a better job of finding the balance of appreciating things when they win and moving on or when stuff like Wimbledon happens of letting it go and moving on,” said Paul Annacone, Federer’s former coach.

Annacone was working with Federer when Djokovic beat Federer in the semifinals of the 2010 and 2011 United States Opens, fighting off two match points in those matches before prevailing.

“I was like, how does that happen two years in a row?” Annacone said. “It was incredible to even imagine it, and so when it happened at Wimbledon, I literally couldn’t believe it.”

But Djokovic clearly had faith, and why shouldn’t he have had it after turning the tables twice before?

He, not Federer or Rafael Nadal, has become the best big-match closer in the game. Djokovic holds winning career records over both men: 26-22 over Federer and 28-26 over Nadal.