What happened to Sheryl Sandberg could happen to anyone: The woman who wrote the book on balancing career and family will have to figure out how soon she will return to her high-profile job following the unexpected death of her husband.

In the book “Lean In,” the Facebook chief operating officer wrote that marriage is “the biggest career decision” a person can make and implored women who want to move up the corporate ladder to settle with someone who wants to do his share in the home.

Now, Sandberg faces the prospect of raising two young children and continuing in a high-flying tech career without her husband of 11 years, whom she often credits with providing the support that was necessary for her to succeed both personally and professionally.

“Dave was my rock,” Sandberg wrote in a Facebook tribute Tuesday after the funeral of David Goldberg, who died in a treadmill accident while vacationing in Mexico. “When I got upset, he stayed calm. When I was worried, he said it would be ok. When I wasn’t sure what to do, he figured it out.”

Sandberg has not made public her plans on returning to Facebook, but the decision she faces highlights a question that the average American worker is not prepared to consider until a similar tragedy strikes: How soon is too soon to return to work after losing a partner, parent, or child?

HOW MUCH TIME SHOULD YOU TAKE OFF

For those who can, experts recommend taking time off. Many big companies offer a few days of paid bereavement leave and counseling for employees once they return to work.

But experts say people can grieve for weeks, months, even years following a death. At a time when workers are being asked to spend more of their time at the office and away from home, they say more companies are flexible in these circumstances.

Karissa Thacker, a workplace psychologist who has consulted for companies such as Ford, UPS and Best Buy, said she thinks Sandberg will “certainly ‘Lean In'” and negotiate how much time she needs for herself during this difficult time. As the No. 2 executive at Facebook (one of the top 20 best places to work in 2015, according to Glassdoor), she is in a position to do so. But other workers in less high-profile jobs may also be afforded more time.

“The first issue is when to go back to work after tragedy strikes,” Thacker says. “There is no easy answer on that one.”

Jess Harvat was able to take several weeks off when his wife, Kellie, died in February of last year. They have a son together. At the time of his wife’s death, he was on a two-week notice, leaving one job, and intending to start at another only a few days.

“I was very fortunate that my new employer allowed me several weeks off before I started to gather my composure, and get to a place where I could function enough to start digging in,” says Harvat, 35, who lives in Golden, Colorado. “The support and structure that they have provided has been a major component in my path to recovery.”

WHAT HAPPENS WHEN YOU GO BACK TO WORK

Still, many workers find it difficult to jump back in to the demands of their daily workload once they’re back at the office. Experts suggest a slow return to work, even going part-time for a while, if possible. And they say everyone from the employers to the workers themselves should be flexible.

Leia Clancy lost her father suddenly last April, after he developed septic shock following chemotherapy. Clancy, 23, took three weeks off work, but felt overwhelmed when she returned.

“I had paid leave, which was really helpful,” says Clancy, who works for a university in the U.K. “But I was also expected to do some work (while on compassionate leave). And when I went back, my employees expected me to be as I was before, and that wasn’t the case.”

For both employers and employees, Clancy’s advice is to understand that grief can be “quite complex, and everyone’s experiences will be different.”

Getting back into a routine can help with coping, though. Some people use their grief to help others. Katie Couric, the TV journalist and former talk show host who lost her husband to colon cancer in 1998, became an outspoken advocate for colon cancer awareness. In 2000, she underwent a colonoscopy on television and a few years later, a mammogram.

And Lisa Brautigam now helps grieving families after losing her 18-month-old son to Sudden Unexplained Death In Childhood in 2012 while he was at daycare. She shares her experiences on a blog and works to raise money for grieving families and to research SUDC.

Because she was diagnosed with post-traumatic stress disorder following her loss, she says she was able to evoke the federal Family and Medical Leave Act, which allows eligible employees to take unpaid leave for 12 weeks. She tried to go back to her job as a Seattle-area environmental attorney a couple months later, she says, and “it just didn’t work.”

After a week back at work, she went back on leave for a couple more months and worked from home to ease back into things. This helped, she says, because she was able to concentrate on work and not on personal interactions, which can be difficult for both the grieving person and to co-workers.

Her advice? People might seem OK, then fall back, and “companies need to understand that it’s not because someone is failing.”