Hillary Clinton held back tears on Wednesday as she asked her supporters not to lose heart after a crushing election loss and to continue working for a better country.
“I will admit coming here tonight wasn’t the easiest thing for me,” Mrs. Clinton said at a gala for the Children’s Defense Fund, where she worked as a young law student. “There have been a few times this past week when all I wanted to do is just to curl up with a good book, or our dogs, and never leave the house again.”
In her first public remarks since conceding to President-elect Donald J. Trump last week, Mrs. Clinton told the crowd she was struggling to recover from an unexpected defeat that she said had left nonwhite children and vulnerable people across the nation afraid.
“I believe the measure of any society is how we treat our children, and as we move forward into a new and in many ways uncertain future, that must be the test for America and ourselves,” Mrs. Clinton said in a 20-minute speech. “No child should be afraid to go to school because they’re Latino, or African-American, or Muslim, or because they have a disability.”
Introduced by Marian Wright Edelman, the group’s president and founder, as “the people’s president” and the first woman to win the popular vote, Mrs. Clinton, who had accepted the group’s invitation before the election, said she had had to overcome deep sorrow to keep the commitment.
But she came bearing a message of resolve.
“I know many of you are deeply disappointed about the results of the election. I am, too — more than I can ever express,” she said. “I know this isn’t easy. I know that over the past week, a lot of people have asked themselves whether America was the country we thought it was.”
She implored her supporters, though, to “believe in our country, fight for our values and never give up.”
Mrs. Clinton has stayed out of the public eye since the day after the election, but in a private call with donors over the weekend, she cast blame for her loss on the announcement by James B. Comey, the F.B.I. director, that he was reviving the inquiry into her use of a private email server as secretary of state. She said that decision, by thrusting the email controversy back into the news 11 days before Election Day, had halted her momentum in the crucial closing days of the race and prevented her from ending her campaign with an optimistic argument to voters.
A second letter from Mr. Comey, clearing her two days before the election, compounded the harm to her chances, Mrs. Clinton told the donors, feeding into a narrative that the contest was “rigged” and causing wavering voters, including white suburban women, to abandon her.
On Wednesday, though, there was no talk of opportunities missed or messages muddled. Instead, Mrs. Clinton was regretful and the slightest bit defiant. She said she wished she could go back in time and tell her mother, abandoned at a young age, not to despair.
“Look at me and listen,” Mrs. Clinton said she would have told her mother, her voice thick with emotion. “You will survive. You will have a family of your own, three children, and as hard as it might be to imagine, your daughter will grow up to be a United States senator, represent our country as secretary of state and win more than 62 million votes” in her campaign for the presidency.
Democrats, stunned and dejected over last week’s electoral losses, are struggling to rebuild their party, re-energize supporters and determine what lessons to draw from their defeat.
President Obama told supporters in a call on Monday afternoon that he expected to be a part of that debate starting in January, when he leaves office. But it is not clear what role, if any, Mrs. Clinton plans to play.