“The Flight Attendant” season 2 came at a particularly difficult moment for Kaley Cuoco.

In an interview with Variety, the 36-year-old got very candid about the mental hardships she was facing while filming the show amid her divorce from Karl Cook.

READ MORE: Kaley Cuoco Finalizes Divorce From Karl Cook After 4 Years of Marriage

“It was one of the hardest years of my life. Not only personally, but doing this character that was so tormented,” she said. “It was the first time that I started therapy — I’ve been very open about that. I started at the beginning of Season 2, just because I was going through so much right before we started shooting. It was horrible. And I developed a stress rash that ran all the way down my body for three straight months that wouldn’t go away. I literally, like, had fire on my leg for three months. I could barely walk.”

She eventually asked co-star Zosia Mamet to move in with her temporarily, explaining, “I really needed someone with me. I was really losing my mind. And then so many of these scenes were so hard to do because they were so hateful, so sad, and so dark, and there wasn’t a lot of levity.”

Cuoco added, “It was the loneliest I’ve ever felt, and I am not really someone to share that.”

READ MORE: Kaley Cuoco Celebrates Emmy Nomination With Boyfriend Tom Pelphrey

Things came to a head a month into shooting, as the actress shared, “I had an intervention on myself in my trailer — all my producers were in there. And I said, ‘I need help.’ It was interesting to say that out loud. And to have everyone be like, ‘Yes, we want to help!’ I’m a working woman, and so independent, and I really take pride in being able to do everything. Well, this time, I literally couldn’t.”

Discussing that period in her life, Cuoco said, “Going through my divorce, it was really a super dark time. I just didn’t know how to deal with it. I was throwing myself into work to deny my depression, and how upset I was. Unfortunately, the character was so depressed that it wasn’t helping me! I was really, really, really struggling. A lot of tears.”

READ MORE: Kaley Cuoco Calls Boyfriend Tom Pelphrey ‘The Man That Saved Me’ In Birthday Tribute

Cuoco did admit that what she was going through personally, likely helped her performance in the second season of “The Flight Attendant”.

“The trauma I was going through probably helped whatever I needed to do for this season. Did I mean for that to happen? Oh my God, no. Did I want that to happen? No,” she admitted. “It was so life-imitating-art at certain moments that it was eerie. I truly feel like the pain I was going through, a lot of that was real on camera.”

She described having a panic attack and feeling like she couldn’t breathe during one particularly stressful scene, but thankfully, she has improved since then.

“I am so much better now!” Cuoco said. “I came out of it a couple months ago, and life totally flipped upside down. Everyone kept saying there’s going to be a light at the end of this tunnel, and I didn’t believe it until it happened. And now I can tell other people that have the worst years of their life: It’s gonna get better.”