Busy Philipps revealed she was prepared to divorce husband Marc Silverstein after seeking out an “emotional boyfriend” when their marriage was on the rocks — until her best friend Michelle Williams stepped in and gave her some advice.

Philipps wrote in her new memoir “This Will Only Hurt a Little” that she sought out support from another man when her marriage to Silverstein began crumbling.

“There was a man I was friends with, another dad. We’d been having lunch and stuff. Texting. Talking on the phone a lot,” Philipps wrote in her book, People reported. “Honestly, I had a crush on him. I like him. Maybe I even loved him? He clearly liked me too.”

Philipps recalled asking Silverstein for a divorce in December 2016 because she just “couldn’t do it anymore.” She revealed the couple’s relationship had been suffering for a while, but Silverstein was still “shocked” by the news and asked for a second chance.

Michelle Williams (left) and Busy Philipps attend the 89th Academy Awards.

Busy Philipps said friend Michelle Williams gave her some advice when she contemplated divorcing husband Marc Silverstein.  (Reuters)

“He didn’t want to get divorced. He wanted a chance to change,” she wrote. “He said I owed our family that.”

Philipps sought out advice from her friends, including Williams who advised the former “Freaks and Geeks” star to think about keeping her family together.

“It would be really awful for two years and then you would find a new normal but honestly, if you can keep your family intact, I think you should do it,” Philipps recalled Williams saying.

Her therapist also said, “Listen. Divorce f--- up children. It just does.”

Busy Philipps said she almost divorced husband Marc Silverstein. 

Busy Philipps said she almost divorced husband Marc Silverstein.  (Getty Images)

Philipps and Silverstein, who got married in 2007, ultimately began attending therapy again, but the actress continued talking to her “emotional boyfriend.”

“This time, Marc got his own therapist. And we started to work through it. But I also kept talking to my emotional boyfriend (for lack of a better term). I know. That part is so s-----. I’m sorry. I really am. I really truly am.”

The couple has two daughters, Birdie Leigh, 10, and Cricket Pearl, 5.