Before she won this year's Democratic primary, Hillary Clinton was a loser. Her defeat by Barack Obama in 2008 was painful and public. She had entered the campaign with an aura of inevitability that disintegrated torturously with every primary loss and superdelegate defection. As journalist John Heileman summed it up at the end, "Her legacy has been tarnished, her status degraded, and her reputation diminished."

Eight years later, Clinton is back on top. Analysts have chalked up her rise to grit, political acumen and the backing of the Democratic establishment. But as elemental to her resurgence as any other factor is Clinton's exemplary approach to failure. For many a politician, a high-stakes rout can be career-ending. Clinton's dexterity in defeat holds lessons for anyone faced with coming back from a harsh setback — that is to say, for all of us.

A Hillary Clinton primer on the art of losing would have several tenets. First, nurse your bruises in private; jettison any public evidence of the emotional detritus of defeat, including frustration, embarrassment and bitterness. En route to her 2008 concession, Clinton's most severe stumble was a shocking third-place finish in the Iowa caucus. After letting a tear roll down her cheek during a public appearance at a New Hampshire diner, Clinton regained her composure and was focused, substantive and even witty at a debate. She expounded on the hunt for Osama bin Laden and managed a chuckle when Obama called her "likable enough." Anyone who has to address a crowd right after hearing bad news would do well to channel Clinton's poise in that debate.

Her feelings remained firmly in check six months later when nary a smirk, never mind a tear, crossed her face in a soaring concession speech to supporters. Whatever family, friends and staff did to get her past campaign heartbreak was neither seen nor heard. Although leaders are expected to get emotional when reacting to tragedies, they cannot be seen to grieve over blows to their own ambitions. Her equanimity in those early post-concession days convinced Team Obama that she could handle the emotional jujitsu of helping propel his campaign. When the person who is fired, passed over or rejected keeps cool, she avoids overlaying extra guilt and awkwardness on an already fraught dynamic and makes it easier for the winner to pull her back into the fold.

The second tenet in the Clintonian art of losing is to project towering self-confidence. Her address to the 2008 Democratic National Convention crackled with the electricity of someone whose political future was far from over. She held fast to the self-assurance that had led her to think she could win the White House in the first place, leaving Obama acutely aware of her potency.

A third tenet is rejection of vengefulness and recrimination. The harsh tone of the hard-fought campaign vanished the moment Clinton lost. Her calls for unity went beyond pro forma and she did not let members of her team bite back, even anonymously. Her husband, Bill, once lapsed into a caustic reference to Obama as the "best man for the job," but that only underscored Hillary's self-control. Her discipline earned her the esteem of Obama supporters who at first fretted about whether party unity could be restored and then credited her when it was.

Fourth, understand the value of a consolation prize. After the primaries, Clinton supporters openly touted her as a deserving running mate. The thinking went that nothing less than veep would befit a candidate who got 18 million votes for president. But when the vice presidency went to Joe Biden, Clinton recognized that losers can't be choosers and became secretary of State. With each achievement at Foggy Bottom, Clinton put 2008 farther back in the rearview mirror. Ordinary mortals in defeat don't get offered Cabinet posts; they face demotions or lateral moves. They should take a page from Clinton by digging in, doing well and writing their own next chapter.

Clinton's service at State allowed her ample opportunity to demonstrate a fifth axiom: commitment to the larger cause. Whether it is to a profession, a sport or a political platform, showing that your dedication transcends personal setbacks earns respect and, eventually, permission to succeed again. If Clinton had given Team Obama any reason to doubt her motives at State, the hatchet buried at the end of the campaign would have resurfaced.

With a general election victory seemingly within reach, failure might seem to be a thing of Clinton's past. But even the most successful presidents fail. Lost votes in Congress, midterm election reversals, deadlocked negotiations, delayed votes and elusive targets are unavoidable. The ability to regroup, retire grudges and rally wavering supporters are essential to surmounting rough patches.

Moreover, the pivotal moments of a presidency are always haunted by the prospect of failure. President Obama's decision to greenlight the raid that killed bin Laden was courageous precisely because it could well have ended in catastrophe. Although no president aims to fail, all need the confidence that failures can be endured. That mettle allows leaders to press forward on efforts — ambitious policy reforms, peace plans — that are as uncertain as they are consequential. We need a president who can win, but also one who knows how to lose.

Suzanne Nossel is a columnist for Foreign Policy magazine. She wrote this article for the Los Angeles Times