For a show that championed the kind of toilet humor made famous by the National Lampoon series, one episode of “Dave” marked a clear turning point for viewers and critics alike.

On the FXX comedy in which Dave Burd, 33, plays a fictionalized version of himself — also named Dave Burd — the up-and-coming rapper is shocked his hype man isn’t prepared for one of the biggest moments of his blossoming rap career. GaTa, the fast-talking energy drink come to life onstage, is sluggish and out of it, running into Burd — known to millions as rapper Lil Dicky — as he rehearses. GaTa needs to take a break on the couch, but Burd’s character isn’t having it, castigating him about the necessity of rehearsal and questioning his motivation.

“Are you high?” Burd asks.

But GaTa is facing something else entirely.

“Dude, I’m . . . bipolar,” GaTa announces, tears streaming down his face. “I have a chemical imbalance going on inside my brain . . . Sometime, I feel crazy. And sometime, I feel lazy.”

In a series with jokes largely predicated on Burd’s (real life and fictional) botched surgeries on his genitalia, the episode tackles a sensitive subject with depth and humor, summed up for viewers by Burd’s agape jaw as he processes his friend’s mental health. “I think it’s pretty cool that we’ve got the first hype man that’s clinically depressed,” jokes Burd’s manager, Mike (played by Andrew Santino).

“It’s much harder to stay mad at this point,” Burd’s character replies. “I love you, man.”

The episode — raw, striking, slightly awkward — was regarded by many as one of the finest on television last year. GaTa (whose real name is Davionte Ganter) told The Washington Post that even actor Leonardo DiCaprio approached him in Malibu, Calif., to tell the newcomer how much he enjoyed the episode. “I couldn’t believe it,” said GaTa, 35.

That’s the unexpectedness of “Dave,” a breakout hit of the coronavirus pandemic when people wanted — needed — to find a reason to laugh in 2020.

It also turned Burd — White, Jewish and middle-class — from a viral hip-hop outsider into a comedic star who balances a steady diet of self-deprecating jokes with poignant moments on mental health, acceptance and his own privilege in a Black art form.

Now, as the country begins to emerge from the pandemic and Burd prepares for the second season to premiere June 16, the rapper is confident that the success of his show, the most-watched comedy series in FX Network’s history, was no fluke.

But in a series where names, careers and maladies are the same, Burd acknowledged that it can sometimes be difficult to separate Dave Burd from Lil Dicky.

“My identity’s still kind of wrapped up in achieving my destiny, so to speak, and that might be a wrong way to live life, but it’s just true about how I was and how I probably am,” he said in an interview last month. “The art itself is totally wrapped up in my identity, which is what this show is, it’s literally about my life.”

Before the online fame, touring and jokes were ever ideas, there was a series of what he calls “lightbulb moments” in a path far different from most rappers. When he was in the fifth grade at Elkins Park Middle School in Pennsylvania, he rapped for the first time in a history presentation on Alexander Pushkin, the 19th-century poet and the founder of modern Russian literature, in a revelation he likened as “almost like a cheat code for me.”

After graduating summa cum laude from the University of Richmond, Burd recorded a video of himself rapping over Drake’s “Best I Ever Had” in an effort to get noticed for the San Francisco ad agency’s account with Doritos, where he worked. What started as him seeking attention turned into the advertising firm Goodby Silverstein & Partners shooting a music video for the snack brand that looked like the ones made by his rap idols.

“I was just like, ‘If people are reacting this way about it being super interesting and funny, and I’m rapping about Doritos data, imagine if I applied my comedic thoughts and used these same resources,’ ” he said.

Thanks, in part, to the bar mitzvah money his parents wouldn’t let him touch until adulthood, Burd went on to produce original music for 18 months — not sharing his work with anyone. As he was ready to post the first video for his song “Ex-Boyfriend” in 2013, he began to cry while brushing his teeth.

“My whole life I’ve felt a certain way about myself — and really nothing to justify it,” he said. “I’ve always had this vision of just being everyone’s funny friend. I felt special and I always felt destined to carry that as like my career and I just felt destined for that. But man, I did not have anything to back that up, bro.”

That changed: “Ex-Boyfriend” got more than 1 million YouTube views in its first 24 hours and launched Burd into viral stardom. He emerged from hip-hop’s fringes through collaborations with the likes of Snoop Dogg that brought hits, live shows and legitimacy. His music and videos now have close to 2 billion views on YouTube and nearly 5 million people a month listen to his songs on Spotify.

With that early success came blowback after a tense interview questioning his privilege and another instance when he repeatedly used the n-word in “Freaky Friday,” a song in which Lil Dicky and singer Chris Brown change bodies, while Brown openly riffs on his controversial past. Burd acknowledged to The Post that he’s evolved from missteps of the past eight years, saying he’s “definitely made jokes in the past that I probably don’t think are funny anymore.” GaTa, Burd’s real-life hype man since 2013, says his friend is now “thinking before we speak.”

“I think he has definitely learned and grown a lot because the tongue is mightier than the sword, you know what I’m saying?” said GaTa, who is Black.

The story of “Dave” cannot be told without GaTa, the undisputed heart of the show despite having no previous acting experience. GaTa recalled in a recent interview how he had been on the road for about a decade before he connected with Burd, working as the hype man for rapper Tyga among others. But when the bright lights of the road went down on the gangly Los Angeles native, GaTa said he “went to a dark place” when he returned from touring and was soon diagnosed with bipolar disorder and anxiety.

GaTa said he was rejuvenated in 2013 when he linked up with Burd, someone he pegged as “a genius” without hesitation or sarcasm. The hype man and rapper are a hip-hop odd couple: GaTa, active and springy, wants to make everything happen by yesterday, while Burd, mild-mannered and neurotic, prefers a snail’s pace. The hype man also brings a balance that Burd admits had been lacking — GaTa calls him out on his issues.

“I’m pretty sure he had Black friends in college and stuff, but I honestly feel like I was the first Black person that was in Lil Dicky’s house with his parents,” GaTa said. “We from two different backgrounds, but he realizes, ‘Damn, I got a real brother onstage with me.’ ”

Being real also meant opening up about his bipolar disorder — an idea Burd wanted to do on the show that caused the normally cool GaTa to backpedal in fear. GaTa was embarrassed, initially not wanting it to be known that the life of the party struggles with mental health. The hype man changed his mind when he found out that people he considered icons were bipolar, saying that he wanted to inspire people in the Black community who might have trouble talking about their mental health.

“I really wanted to let people into my world and let them know that it’s okay to not be okay,” he said.

It was a balancing act, Burd said, that the show pulled off to give the audience something more to lean on than just crude humor.

“Some of my favorite comedies ever, I love them, they’re my favorite things of all time, but like I don’t really like feel emotionally invested in the outcomes of their lives on television,” Burd said. “I want people to feel so emotionally invested in GaTa’s success, my success.”

Executive producer Jeff Schaffer, who produced “Seinfeld” and Curb Your Enthusiasm,” said he was interested in working with Burd after the Internet became mainly a source for Lil Dicky videos and chain emails. Schaffer said that Burd “has a lot of Larry David in him,” but wanted to see the man behind Lil Dicky. What he found, he said, was someone who was not just “one of the most complicated, simple people I’ve ever met” but also a creative partner willing to come clean about how his girlfriends never really saw what his genitalia looked like because he would always have the lighting just right.

“I said, ‘Thank you for telling me and it’s great that it’s a secret, but you know that’s the first scene of the show,’ ” Schaffer said. “And you know what? To his credit, he did it.”

The second season will follow the gang as Burd’s character continues his path toward possible stardom, or at least acceptance, in his own often self-absorbed way. The anxiety and overarching doom Burd said he felt in creating the show has been lifted, despite all the issues that came with filming in a pandemic for a show that now has high expectations.

“When we wrapped this season, I always said it would feel like in ‘Ocean’s Eleven’ after they complete the heist,” he said. “All of them standing in front of the fountain and being like, ‘How . . . did we just pull that off?’ ”