HBO

There’s a moment during the second half of Judd Apatow’s documentary about Garry Shandling when the purpose of the movie becomes clear. Apatow has spent more than four hours chronicling the life and career of his mentor and friend, and after all this time piecing together home videos and personal photographs and testimonials and Shandling’s own diaries, you get a glimpse of what it must have been like to know him. You also feel, as a viewer, a profound sense of regret that you never will. The spiritual teacher Ram Dass tells Shandling in one Skype conversation, “My heart’s warm just being with you,” and the strength of The Zen Diaries of Garry Shandling is that for a moment you sense that warmth, too.

The two-part documentary, which concluded with its second installment on HBO Tuesday night, is essentially a eulogy for Shandling. Apatow has access to a murderer’s row of personalities from the comedy world, and so there’s Jay Leno and Conan O’Brien and Sarah Silverman and Jim Carrey and Jeffrey Tambor and Bob Saget, all discussing Shandling’s life, his career, his presence in their lives. But Apatow digs deeper, too. He interviews friends and colleagues and cousins and ex-partners, all because he seems to be trying to get to grips with something. “He was always there for me personally, professionally,” Apatow says early on about Shandling. “But in a lot of ways, he was a mystery to me.”

It’s this sense of conflict that drives Zen Diaries, which works from Shandling’s childhood through to his death at 66, and wrestles with the disparate realities of who he was. His life, as Apatow presents it, was defined by great loss and by singular joy, by generosity and by flashes of rage, by a spiritual desire to abandon his ego and by the performer’s innate desire for applause. In one scene, warming up on the set of a talk show, Shandling cracks joke after joke about his relentless brain, and the peace it won’t allow him. “Get Dr. Kevorkian’s number,” he quips. His mood is ominously black. But the audience never stops laughing.

Zen Diaries attributes much of the conflict in Shandling’s life to the loss of his older brother, Barry, who had cystic fibrosis and who died when both were children. Shandling wasn’t immediately told about his brother’s death, or allowed to say goodbye; he wrote in his diary that he couldn’t even attend the funeral, because his mother didn’t want him to see her cry. After the loss of one child, she developed a concern for the other that must have felt claustrophobic. Shandling’s later interest in Zen Buddhism, the movie theorizes, was part of an attempt to repair the aftershocks of his brother’s death: to have people be present and honest around him, and to commit to finding the truth in any moment.

The documentary is punctuated by excerpts from Shandling’s diaries—handwritten, earnest entreaties to himself. In the earliest days of his career, when he was doing late-night gigs at The Comedy Store in Los Angeles and feeling deeply insecure about his talent, the entries are agonized and fretful. “Am I funny?” “Am I going to wind up broke?” “I CAN’T THINK OF BEING GOOD ENOUGH.” As his career takes off after a standout performance on The Tonight Show, the pressure to succeed eases, but Shandling’s professional restlessness leaves him constantly chasing new opportunities. Apatow captures his creation of It’s Garry Shandling’s Show and then The Larry Sanders Show, a satirical talk-show sitcom. That show, the director argues, was an opportunity to skewer “everything Garry was struggling with, his ego and vanity and narcissism.” The target of the satire, as much as the comedy world, was himself.

Zen Diaries, in its commitment to grappling with the light and the dark of Shandling’s personality, offers a broader meditation on comedy, and on the impulse that drives people to crave making others laugh. And, like the field it studies, it’s dominated by men (Shandling’s ex-fiancée Linda Doucett, whom he fired from The Larry Sanders Show post-breakup, is one notable exception), which seems to replicate the fraternal environment Shandling sought out after his brother’s death. He never married or had children. His world wasn’t ideal for everyone: The writer Janis Hirsch, who worked briefly on It’s Garry Shandling’s Show, and who spoke out in 2017 about the hostile environment she experienced there, has written that she finds it hard to reconcile the Shandling portrayed in the documentary with the man she remembers. But she praises it nonetheless.

Zen Diaries often loses focus, or gives excessive time to clips that seem extraneous. But it’s easy to forgive, because Apatow’s affection for his subject is so palpable, and so contagious, and because in the scattered collage of film and photos and affirmations and jokes it pinpoints the truth Shandling was looking for. Later in life, after he stepped back from performing, he seemed to find it easier to unite his zen principles with his desire to help others than with pursuing his ambitions in show business.“He was everything he needed and was never given, to everyone,” Sarah Silverman says. The power of Zen Diaries is that it allows you to share, for a few hours, a sense of what that must have felt like.

We want to hear what you think. Submit a letter to the editor or write to letters@theatlantic.com.