A poster hanging near Sheryl Sandberg ’s conference room at FacebookInc. ’s Menlo Park, Calif., headquarters reads in red block letters, “Kick the Sh— Out of Option B.”
It is advice that a friend gave Ms. Sandberg in a difficult moment shortly after her husband, technology executive Dave Goldberg, died suddenly last year. Ms. Sandberg recounted the conversation in a public Facebook post; soon after, posters with the saying appeared at Facebook offices world-wide.
The post and the posters show how Ms. Sandberg, chief operating officer of a company that encourages its 1.65 billion users to share their lives online, is grappling with her grief in public.
Over the past 14 months, she has wrestled with her feelings out loud in about a dozen Facebook posts. In May, she delivered a commencement address at the University of California, Berkeley, focusing on lessons she has learned since Mr. Goldberg’s death.
His death also has prompted the 46-year-old Ms. Sandberg to rethink aspects of her 2013 feminist manifesto, “Lean In.” In a post on Mother’s Day, Ms. Sandberg, a mother of two preteens, acknowledged criticism that her book didn’t adequately consider the challenges of single parents.
ADVERTISEMENT

Sheryl Sandberg, Facebook’s chief operating officer and author of the bestselling “Lean In,” discusses the barriers to advancement women face in their careers, at WSJ’s Women in the Workplace event. (Originally published Sept. 30, 2015)
“Some people felt that I did not spend enough time writing about the difficulties women face when they have an unsupportive partner, or no partner at all,” she wrote. “They were right.”
She has mourned her husband in private events with advertisers and employees. In April, she hosted a dinner for some big Facebook advertisers and their agencies, a few hours after a school event for her children touched off a fresh wave of sadness about Mr. Goldberg’s absence.
After rising to welcome the roughly 20 attendees, Ms. Sandberg stood silently for a few moments, according to Carolyn Everson, Facebook’s vice president of global marketing solutions, who attended the dinner. Then, Ms. Sandberg said she had had a bad day. She discussed her struggle to find meaning amid the dark days; she spoke of her passion for her work. The room was quiet, said Ms. Everson.
“She could have put on the corporate face, the ‘I’m going to get through this dinner,’ face,” Ms. Everson said of the evening. “But she was brave. She told them she was hurting and it was real.”
Such outpourings are something of a departure from Ms. Sandberg’s upbeat public persona before Mr. Goldberg’s death.
Ms. Sandberg, who declined to be interviewed, has been Chief Executive Mark Zuckerberg ’s top lieutenant since joining Facebook in 2008 from Google, now a part of Alphabet Inc. Earlier, she was chief of staff to then-Treasury Secretary Larry Summers.
“Lean In” sparked a global debate about the treatment of women in the workplace. In the book, Ms. Sandberg touched on past moments of insecurity and encounters with sexism. 
Since Mr. Goldberg’s death, she has surprised friends and colleagues by writing about her grief as it unfolds. Her disclosures have made it easier for many Facebook executives to discuss personal matters, Ms. Everson and others at the company say. “She’s been open about herself in real time. She shares the depths of her grief in a public manner,” Ms. Everson said.
Mr. Goldberg died from a cardiac arrhythmia at age 47 on May 1, 2015. He was CEO of online-questionnaire provider SurveyMonkey.com Inc. and a well-liked and respected figure in Silicon Valley.
In the closing chapter of “Lean In,” Ms. Sandberg called him “my best friend, closest advisor, dedicated co-parent, and the love of my life.” His death plunged Ms. Sandberg into a “deep fog of grief,” she said in her Berkeley speech.
The night of Mr. Goldberg’s funeral, Ms. Everson gave Ms. Sandberg a blue rubber bracelet that said “#fbfamily.” 
Ten days after Mr. Goldberg’s death, Ms. Sandberg returned to work and her children to school. She has been traveling less since his death; she is also pickier about what goes into her schedule, according to Facebook.
Some of Ms. Sandberg’s Facebook colleagues were initially wary of her publicly discussing her grief. Ms. Sandberg, too, had her doubts.
She did it anyway. In a June 2015 post marking the end of the 30-day Jewish mourning period, she described her anguish, how her mother held her at night “until I cry myself to sleep.”
The post has since garnered 913,000 likes and 74,000 comments, including many from users who shared their own stories of loss.
In the post, Ms. Sandberg described a moment just weeks after Mr. Goldberg died, when she and a friend discussed how to handle a coming father-child event. She cried: “But I want Dave.” Her friend, energy investor Phil Deutch, replied, “Option A is not available. So let’s just kick the sh— out of Option B.”
The line resonated with Ms. Sandberg. She has referred to it elsewhere, including a post in October marking what would have been Mr. Goldberg’s 48th birthday.
In January, she gave the keynote at Facebook’s Women’s Leadership Day, an annual gathering of more than 2,500 female employees.
At the same event a year earlier, she suggested that things are more likely to work out if you think they will. This year, she acknowledged this isn’t always true, according to Facebook spokeswoman Anne Kornblut. Ms. Sandberg said she was slowly, unsteadily rebuilding her life, and it wasn’t clear that she would recover fully.
Her Mother’s Day post about parenting challenges highlighted Connie Sparks, who started a Lean In circle for single mothers and founded a company that helps women start businesses.
Ms. Sparks, of Santa Clarita, Calif., said Ms. Sandberg called her the week before Mother’s Day.
“She talked about how hard the role of a single mom was both mentally and physically,” Ms. Sparks said in the interview. “It’s true. It’s really tough.”
Write to Deepa Seetharaman at Deepa.Seetharaman@wsj.com