Kaley Cuocois looking back on the day she announcedher divorcefrom Ryan Sweeting.

In Jessica Radloff’s neworal history bookThe Big Bang Theory: The Definitive, Inside Story of the Epic Hit Series, the actress, 36, opened up about how the set of the CBS sitcom was “a really wonderful escape” amid her personal turmoil.

On the dayher divorcewas made public in September 2015, Cuoco recalledEntertainment Tonightvisiting the set and watching her film a scene with costarsJohnny Galecki,Jim Parsons,Kunal NayyarandSimon Helbergfor an episode in the show’s nine season, titled “The 2003 Approximation.”

“I was in a scene in the comic book store, wearing a purple sweater, and sitting on the couch between Jim and Johnny, while Simon and Kunal were singing this ridiculous song in their little band. And I am hysterically laughing. Genuinely. And they used it,” she shared. “And that was the scene we were shooting whenETwas watching us, and I remember sitting there, thinking, ‘My divorce is about to be announced right now.'”

Jordin Althaus/Warner Bros.

“The Comet Polarization” - Pictured: Howard Wolowitz (Simon Helberg), Leonard Hofstadter (Johnny Galecki), Rajesh Koothrappali (Kunal Nayyar), Penny (Kaley Cuoco), Sheldon Cooper (Jim Parsons) and Amy Farrah Fowler (Mayim Bialik). Sheldon’s comic book store experience changes when writer Neil Gaiman puts Stuart’s store on the map. Also, Koothrappali takes credit for Penny’s astronomical discovery and friendships are threatened, on THE BIG BANG THEORY, Thursday, April 19 (8:00-8:31 PM, ET/PT), on the CBS Television Network. Photo: Jordin Althaus/Warner Bros. Entertainment Inc. © 2018 WBEI. All rights reserved.

The Flight Attendantstar added the performance provided her with a much-needed relief from her personal life.

“Simon and Kunal had me laughing so hard that tears were coming down my face as they were performing this song, and I just got to sit there and watch them as Penny, but it was also me,” she explained. “And it just took me totally out of what was going on in my personal life. And everyone [in the cast] knew what was going on with me and they were very protective.”

She continued, “I just remember the drama going on behind the scenes, but shooting that scene was a really wonderful escape.”

Kaley Cuoco.Araya Doheny/Getty

Kaley Cuoco

Cuoco and Sweetinggot engagedin September 2013 after three months of dating. The couple tied the knot in December of that year. The former couple then announced that they weresplitting upjust 21 months later.

RELATED VIDEO: Kaley Cuoco Reflects on Ryan Sweeting Divorce: He ‘Was Not the Person I Originally Met’

“I honestly thought I wouldn’t get married again. My ex ruined that word for me,” Cuoco said at the time. “I married someone the first time who completely changed. The person I ended up with was not the person I originally met. And that wasn’t my fault — that was his.”

Kaley Cuoco and Ryan Sweeting.Michael Tran/FilmMagic

Kaley Cuoco and Ryan Sweeting

Never miss a story — sign up forPEOPLE’s free daily newsletterto stay up to date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.

The Big Bang Theory: The Definitive, Inside Story of the Epic Hit Seriesis available now wherever books are sold.

source: people.com