Maria Bamford is brilliant at playing a certain type of character: a woman not so much on the verge of a nervous breakdown as in the thick of one. This has made her a tricky proposition for prime-time television, which tends to fill its “weirdo” roles with telegenic ingénues whose quirks can be summed up by lighthearted gags and one-liners. (Remember Phoebe Buffay?) Bamford, whose style tends more toward the unhinged, made her first television appearance 20 years ago on an early web series from comedy troupe Second City; since then, she’s mostly reached TV audiences through guest roles and voice work. She’s usually the best thing about whatever scene she’s in: You might remember her as May Kadoody, the fire-and-brimstone new mayor on The Sarah Silverman Program, or as recovering addict Debrie Bardeaux in Arrested Development’s fourth season. But with Lady Dynamite, her Netflix original series, Maria Bamford has finally found the perfect showcase for her darkly hopeful worldview.

Bamford mines her humor from the realities of living with mental illness: She’s been diagnosed with OCD and bipolar II disorder and has coped with anxiety and depression for decades. To experience Maria Bamford’s comedy—especially her standup—is to be reassured that mental illness is a part of life and that forced isolation does not have to be one of its torments. By depicting her own misery and mania, she also does something profoundly generous, reassuring those who don’t feel safe enough to be open about their own struggles that they are not suffering alone.

As with any cult figure, Bamford’s fans can be counted on to tell you exactly when they fell in love with her work. For me, it was 2007’s The Maria Bamford Show, an ultra-low-budget web series that appeared on TBS’s comedy website, Super Deluxe. In the web series she played herself in a fictionalized scenario that had her suffering a nervous breakdown and returning to her parents’ house in Duluth, where she also played all her family members, friends, and enemies. (The only other actor on the series was Bamfords pug, Blossom.)

Lady Dynamite, which she produced with the help of Arrested Development’s Mitch Hurwitz, covers similar territory, only this time Bamford has infinitely greater resources at her disposal. Bamford plays a comedian named Maria Bamford who has just landed her own TV show, where she will play a comedian named Maria Bamford. “My show?” she says in the first episode’s opening moments. “I have a show? I’m a 45-year-old woman who’s clearly sun-damaged! … And I have a show!

Bamford is generous to her costars, all of whom get the chance to utilize their own particular comedic strengths, rather than simply acting as window dressing. Fred Melamed (A Serious Man) cuts a charismatically lugubrious figure as Maria’s manager, Bruce Ben-Bacharach. As Maria’s parents Joel and Marilyn, Ed Begley, Jr. and Mary Kay Place are nutty paragons of Minnesota Nice. And, in the first few episodes, performers like Patton Oswalt, Mira Sorvino, and Mark McGrath (yes, that Mark McGrath) appear as themselves, exploring the possibilities and limits of their public personae.

The show jogs through time, returning Maria to the post-breakdown life in Duluth that she featured in The Maria Bamford Show, and then leaping with no warning back to sunny Los Angeles. It also fluctuates wildly in tone, absurdly comedic in one scene and despairing in the next. This instability isn’t a failure of the series, but its defining trait: The approach is an extension of Bamford’s ability to reveal laughter as the obverse of terror and discomfort.

With its whiplash leaps across genre and its itchy self-awareness, Lady Dynamite is reminiscent of Comedy Central’s Kroll Show—where Bamford, a pug owner, once guest-starred as a pug owner—and Adult Swim’s Tim and Eric Awesome Show, Great Job!, in which Bamford memorably appeared as “Maria the Cat Specialist. More than anything, though, Lady Dynamite is like Mr. RogersNeighborhood for misfit adults. Maria Bamford is less the star than the host, taking viewers by the hand to guide them through her world.

“I’m a natural extrovert, and so this is a pleasure,” Maria tells a handsome dinner party guest in the series’ fourth episode. She has put on what she calls her “Diane” voice—a sultry purr that’s half late-night news anchor, half primetime soap—and has created a persona to match. As Diane, she’s WASPy, assertive, and comfortable in her skin, but she’s also not herself. The trouble comes when the stranger she has been chatting with prefers Diane to Maria, and Maria feels obliged to keep up the façade.

It’s a dilemma Bamford explored once before in The Maria Bamford Show, in an episode where she adopts the persona of a fun-loving, TV-friendly comedienne to counter her crippling stage fright. (Sample joke: “You know when you’re watching TV with your boyfriend, and he wants to watch sports, and you want to watch Friends, or some other, more recent reference?”) Her family loves it. “I see the daughter I’ve always wanted!” her mother exclaims.

In Lady Dynamite, Bamford maintains the fiction for much longer, with devastating results. The moral of this kids-show-for-adults is “don’t be a people pleaser.” Disjointed in its timeline, genre, and tone, the episode finds its center in this lesson, and in representing the difficult work of being, or trying to be, yourself.