Hillary Rodham Clinton, who, as she puts it, won “more votes for President than any white man” in American history, is not the first candidate to capture the popular vote but lose the election. She is the fifth. The Founders, for varying reasons, distrusted popular democracy. Southerners were wary of a challenge to slavery; others feared the emergence of a national demagogue. The Electoral College, Alexander Hamilton wrote in Federalist Paper No. 68, would block the rise of a leader with “talents for low intrigue, and the little arts of popularity.” An extra layer of electoral deliberation, he thought, would also insulate the American system from a hostile hack from abroad—“the desire in foreign powers to gain an improper ascendant in our councils.”

Andrew Jackson was the first to suffer this constitutionally enabled result of losing-while-winning, when he conceded the 1824 race to John Quincy Adams. Jackson, whose portrait now hangs in the Oval Office, charged that he had been undone by a rigged ballot. In 1888, Grover Cleveland lost in much the same manner to Benjamin Harrison, but then avenged his humbling four years later. Samuel Tilden fell to Rutherford B. Hayes, in 1876; and yet, after the baroque, months-long struggle inside the Electoral College, Tilden seemed almost relieved. Now, he said, “I can retire to private life with the consciousness that I shall receive from posterity the credit of having been elected to the highest position in the gift of the people, without any of the cares and responsibilities of the office.”

In the ballot of 2000, Albert Gore, Jr., Bill Clinton’s Vice-President for eight years, won half a million more votes than the governor of Texas, George W. Bush. After losing the final battle before the Supreme Court, Gore soon departed Washington to brood in Nashville. He grew a beard. He grew fat. He seemed, at first, quite lost. When I visited him there, a few years later, he said he would eventually get around to confronting that bitter experience, just not yet. He never fully did so, certainly not at book length. Instead, with time, he shaved his beard, travelled the world giving lectures and making a documentary about climate change, and, in 2007, shared the Nobel Peace Prize with the Intergovernmental Panel on Climate Change. He made a fortune as an Apple director, a Google adviser, and a venture-capital partner. He found his way. And whenever someone brought up the election of 2000 he always remembered to lighten matters, saying, “You win some, you lose some, and then there’s that little-known third category.”

For all of Hillary Clinton’s skills of survival, she will have a hard time finding a similar peace or place in public affairs. For one thing, Gore was in his early fifties when he lost. Clinton is sixty-nine. For another, the circumstances surrounding her defeat are immensely more disturbing. Clinton lost a race that few thought possible to lose. Her opponent was not Mitt Romney or John McCain or Marco Rubio but Donald J. Trump, a demonstrably crooked businessman and reality-television star, an unsavory, if shrewd, demagogue whose rhetoric and policy proposals had long flouted the constitutional norms of the United States. She lost because of the tactical blunders of her campaign. She lost because she could never find a language, a thematic focus, or a campaigning persona that could convince enough struggling working Americans that she, and not a cartoonish plutocrat, was their champion. She lost because of the forces of racism, misogyny, and nativism that Trump expertly aroused. And she lost because of external forces (Vladimir Putin, Julian Assange, James Comey) that were beyond her control and are not yet fully understood.

“There are times when all I want to do is scream into a pillow,” Clinton admits in a raw memoir, both apologetic and apoplectic, called “What Happened.” Clinton describes the daily activity of working on the book with her collaborators, two former speechwriters and a researcher, as “cathartic.” They spent long sessions at her house talking through the details of the campaign, exchanging notes, suggestions, edits. But, as Clinton said when we met recently for a long conversation, the process of thinking about it all—Trump looming over her like a predator at the second debate, the incessant drumbeat of “e-mails, e-mails, e-mails,” awaking from a nap on Election Night and being told that Michigan, Wisconsin, Pennsylvania, and the election itself had all slipped away—was like willfully reënacting a hideous accident. “Literally, at times when I was writing it, I had to go lie down,” she said. “I just couldn’t bear to relive it.”

But, against the advice of some of those closest to her, she has relived it, for publication. Clinton’s memoir radiates with fury at the forces and the figures ranged against her, but it is also salted with self-searching, grief, bitterness, and fitful attempts to channel and contain that fury. At one point, she writes, “Breathe out. Scream later.” On the night of November 8th, Clinton expected to give a victory speech at the Javits Center, in Manhattan, as the first female President-elect. The stagecraft was in place: she would wear white—“the color of the suffragettes,” the fulfillment of Seneca Falls—and stand on a platform cut into the shape of the United States, under a vast glass ceiling. It was to be a triumph on a historic scale, an American breakthrough as consequential as Barack Obama’s Election Night speech in 2008, at Grant Park. Instead, the next morning, she wore purple, a symbol of the unity of red and blue states, and, before hundreds of shocked, weeping staffers, she made her way through a hastily drafted message of endurance and gratitude. Afterward, she and Bill Clinton climbed into their car and, as they were driven along the Hudson River, she was hollowed out, unable to speak, struggling to breathe: “At every step I felt that I had let everyone down. Because I had.”

When Clinton arrived home, she changed into yoga pants and a fleece and wandered outside. She lives on a cul-de-sac called Old House Lane, in Chappaqua, a wooded hamlet in Westchester County. The property is surrounded by a high white fence. Secret Service officers operate out of a red barn in the back yard. It was cold, rainy, quiet, and, she writes, “the question blaring in my head was, ‘How did this happen?’ ”

Before I went to see Clinton, I spoke with some of her top advisers in the campaign. Some still work with her; others stay in close touch, commiserating, exchanging links to stories about Trump-related outrages or malfeasances. They share a sense of colossal failure—of having failed Clinton, and, more, of having failed the country. They know that she, too, carries a sense of both victimhood and guilt. “There is an exponential quality to the pain she feels,” one of them told me. “It’s the pain of losing an election that you thought you were going to win. And it’s taken to the nth power. It’s squared by the fact that this is the second time she has fallen short, and cubed by the fact that the person who won is so deeply unworthy, in her view, and represents a mortal threat to American greatness. There is in her a depth of anguish about the outcome that there is no parallel for in modern memory.”