From one failed candidate to another: Move on.

Hillary Clinton prematurely debuted her soul-searching election postmortem, “What Happened,” and presently “doesn’t have anything to do,” Sen. John McCain argued in a recent interview. “You’ve got to understand that you can’t rewrite history,” the Arizona Republican told Esquire. “One of the almost irresistible impulses you have when you lose is to somehow justify why you lost and how you were mistreated: ‘I did the right thing! I did!’ The hardest thing to do is to just shut up.”

McCain, whose own forthcoming memoir will touch upon his 2008 presidential loss, added: “What’s the f—ing point? Keep the fight up? History will judge that campaign, and it’s always a period of time before they do. You’ve got to move on. This is Hillary’s problem right now: She doesn’t have anything to do.”

Whether you’ve lost a historic election or botched a huge project at work, it’s important to know when — and how — to shut up and move on after a crushing defeat. Here’s what experts had to say:

Also read: More bosses are going to ruin your holiday this year. Here’s proof.

Think about whether your defeat is final and definitive. “If you have been rejected for something, there are plenty of times where persistence does pay off and where trying to shape the dialogue around you does pay off,” management consultant Dorie Clark told Moneyish. “But if you have been defeated or turned down by the ultimate arbiter, then it is a good idea to go away for awhile, because otherwise it looks like sour grapes … You look like you can’t give it a rest, which is not a great thing for your brand.”

Speak about your loss clinically, not personally. You’re entitled to a mourning period, executive coach John Baldoni told Moneyish, but be sure to discuss your defeat from a rational, analytical standpoint rather than an emotional one. “Ask questions; debrief. Did we have the right resources? Did we have the right people? What could I have done better?” he said. “That said, if you only talk about what happened to you and make it all about personal things — you were done in; you never had a chance — that gets old real fast.”

Also read: 3 things we do that are most likely to annoy the crap out of our coworkers

Seek perspective on how to handle defeat gracefully, Clark said. “There’s just a difference between rehashing something with your friends and your inner circle … and rehashing it in the public sphere, whether it’s by writing a memoir or complaining to your boss or leaders at your organization,” Clark said. Approach counselors whose judgment you respect and “who can talk you down when you get worked up,” she said.

Look forward, not backward. “Life is an arc of ups and downs, so look for your next high point,” Baldoni said. “What can I do better the next time?” Clark, referencing McCain’s charge that Clinton “doesn’t have anything to do,” argues “there is almost no one that simply doesn’t have enough to do” in modern times. “The question is, really, what do you choose to spend your time doing?” If you’ve been laid off, for example, you might choose from a “myriad of opportunities” like charitable pursuits, networking or taking a course to gain new skills.