Comedy heals. Comedy distracts. Comedy brings us joy when life is bleak. So what do comedians do when their own lives are looking grim? They go to work.

Despite the success of her podcast, “Professor Blastoff,” and a gig writing for an upcoming Comedy Central show, Tig Notaro, left, hasn’t had much to laugh about of late. A case of pneumonia turned into a bacterial infection that left her hospitalized. She and her girlfriend broke up. Her mother died.

Then, she was diagnosed with breast cancer.

So, Notaro, 41, took to the stage, performing a set in Los Angeles last month that began very matter-of-factly: “Thank you, thank you, I have cancer, thank you, I have cancer, really, thank you,” she said. It was an emotional and poignant take on a string of very bad luck. Louis C.K., who was in attendance, called it “masterful.” Ed Helms, who had introduced her, said it was “amazing.” “This American Life” plans to air part of the set on an upcoming episode.

It was the only way she could reveal the news. Comedians are at their best when they channel their real-life experiences into humor. Yet what Notaro did transcended comedy.