Six weeks after roundly kicking breast cancer's ass, I began the writers room — with my best friend and co-showrunner Lennon Parham — for season three of USA's Playing House. My hair that I had lost during treatment (I had kept about half by freezing my scalp) was growing in and I looked alarmingly like Dog the Bounty Hunter, which may have given me an air of authority in the room. But other than that, you would have had no idea I had just been through the most terrifying and exhausting seven months of my life. Words could not describe how happy I was to be back.

We began the room as we always do, by sharing stories of what's happened to us the past year to our six writers, all of whom are dear friends. Tears were shed. A tremendous amount of Trader Joe’s chocolate chip dunkers were eaten. Lennon and I had not yet decided whether we were going to bring what we had been through into the show. That past year, when I wasn't busy Googling "What did Debra Winger die of in Terms of Endearment," I had kept a mental list of all the moments, both funny and sad, that we could potentially write about. There was no more high-stakes story we could tell to show the fierce way women show up for each other. I have always turned to TV for comfort (Gilmore Girls got me through a rough patch in my 20s — so much so that I cried when I stumbled upon the Stars Hollow set on the Warner Bros. lot), and I wanted to show women coming behind me that they could get through something as harrowing as cancer with the help of their friends and even emerge happier than they were before.

Lennon was less convinced we should do it: Yes, very funny and insane things had happened — and she felt each one like a sommelier would and then announced "'It's Number 2" like she was dropping the mic — the fear of losing your best friend and seeing her go through the most treacherous journey of her life was not something either of us felt like reliving. Not to mention we had spent so much time carefully building the charming and joyful world that Maggie and Emma lived in, complete with their Pinterest-worthy, cozy home and the lovable weirdos that surround them. If cancer came to Pinebrook, would it shatter the beautiful world that we knew our fans had come to love? But we were raised as comedians at the Upright Citizens Brigade, where the motto is "Don't think," which always has meant: If you're afraid, you must do it. So after careful deliberation, and with the blessing of our head writer, Anthony King, we took each other's hands and jumped off the cliff, Thelma & Louise-style. Man, why are women always biting it in every movie we love?!

It was truly surreal to see index cards on the board that had scenes like "Maggie chooses Emma's boobs" or "Surgery is a success!" We decided to have Emma get diagnosed middle of the way through the season, so that we could have a couple episodes to enjoy the girls being up to their old tricks before the big C shows up. In the episode when Emma gets diagnosed, it comes out of nowhere, much like it does in life. And just like in life, even when you're dealing with serious stuff, there are always funny moments. Strangely enough, I think that the episode where Emma finds out she has cancer is both one of our funniest and most heartbreaking. The one thing we decided not to show was Emma in chemo because, let's face it, chemo just plain sucks.

In order to capture the real way Lennon and I talk to each other, we've developed a unique way of writing scripts in which we improvise every scene, playing all the parts and recording ourselves. Those transcripts are used as the basis for the first draft. What that meant this season, however, is that we had to re-enact traumatic scenes from real life, and that was … not fun. One of Lennon's superpowers is that she is able to mimic people, down to the cadence of their voices. So when it came time to improvise the scenes with my doctors, Lennon was able to re-create almost word for word what they said and how they said it. I have never understood what a true flashback is until that moment. When Lennon transformed into my doctor, I found myself right back in that exam room, experiencing all the same emotions. The scenes you see in the show (my surgeons are played by the incredible Laurie Metcalf and Michaela Watkins) are pretty much word for word what happened in real life, just with better hair. In the middle of writing the surgery scene, we stopped and held hands and just sobbed. It was in that moment we knew that if, at the end of the day, nobody saw it, it would still be worth it for us to be able to process these emotions and move through them. Whenever things got too intense, we took a break to watch a clip of Channing Tatum doing the pony dance in Magic Mike. We watched that dance a lot.

At the ATX Television Festival, a woman shared that she was caring for her ailing mother and that her best friend's husband has stage IV cancer. When it all gets to be too much, they pile on her bed for a Playing House marathon. Of course, Lennon and I burst into tears and looked at each other. Jumping off that cliff was worth it, and look, we survived.

A version of this story first appeared in the June 21 issue of The Hollywood Reporter magazine. To receive the magazine, click here to subscribe.