Some of the best episodes of television have nothing to do with their show’s main characters. Call them Deep-Benchers: They’re what happens when Buffy the Vampire Slayer, The Simpsons, or BoJack Horseman takes a sudden dive into the life of a relatively minor character, often leaving the actual protagonists temporarily behind to do it. These episodes are weirdly, reliably great, in large part because of the way they play with the medium’s strengths and limitations. Episodic TV gives a show the space, time, and structure to take a brief detour from its main narrative focus, adding depth and texture to an ensemble. But these episodes highlight a show’s blind spots, too. This stuff is happening off camera ALL THE TIME, they say. You just don’t get to see it.

Wednesday night, You’re the Worst (just renewed for a fourth season) aired one of the most effective Deep-Benchers I’ve ever seen, a wrenching tonal pivot that’s also a knowing self-criticism. It’s phenomenal.

For a show that brags, in its title, about its objectively terrible characters, Desmin Borges’s Edgar Quintero presents something of a challenge. An Iraq War veteran who lives with the show’s main couple for free in exchange for serving as their personal breakfast chef, Edgar is the odd one out, a sweetheart with real problems — money problems, post-traumatic stress disorder problems — on a show full of privileged misanthropes. His situation requires sensitivity from You’re the Worst, even as the rest of its characters pride themselves on being insensitive.

It’d be easy for the callousness of primary couple Jimmy (Chris Geere) and Gretchen (Aya Cash) to rub off on You’re the Worst itself. And when it comes to Edgar, You’re the Worst has occasionally skirted that line: there’ve been plenty of jokes about the horrors he saw on the battlefield, even as he got subplots of his own about finding an outlet, and eventually a girlfriend, through improv comedy. So far, though, the show’s third season had veered into the outright mean-spirited. After going off his medication, Edgar’s clearly been going through some shit. We just don’t know what that shit is, in part because narcissists like Jimmy and Gretchen would never bother to ask.

“Twenty-Two,” written and directed by series creator Stephen Falk, cuts out the middleman and just shows us. It’s a day in Edgar’s life — a day, in fact, that’s already been covered by the events of the show. We’ve already watched Edgar serve pancakes to the rest of the crew, or give Jimmy and Gretchen a ride on his way to a meeting at the VA. We just haven’t watched him do it from Edgar’s perspective. This time, we hear the ringing in Edgar’s ears. We see the queasy, quick-cut vantage point of a mind driven to paranoia. We feel Edgar’s frustration at not getting better, his blind rage at a condescending bureaucrat who won’t approve him for experimental treatment until he gets back on his ineffective meds, his pure desperation when he parks his car by the side of the road with a bottle of booze and, for one terrifying second, considers walking into traffic.

It’s a spiritual sequel to “LCD Soundsystem,” another episode written and directed by Falk that saw Gretchen devastatingly come to grips with the intractability of her mental illness. But we always knew her inner turmoil would get its due, because Gretchen and her problems are one of the driving forces of You’re the Worst. Edgar’s solo adventure comes as much more of a surprise, which makes it all the more powerful.

“Twenty-Two” climaxes with a hell of a joke, though. Just as Edgar’s about to take the plunge, he sees a poignant cliché that gives him pause: a perfectly folded paper boat, floating down the sludge trickle that is the L.A. River. It’s a relief, but also a little pat — the suicidal man is overcome by the surprising beauty of life and walks off the ledge. And then, in the most Los Angeles moment imaginable, a voice screams, “Goddammit, CUT.” The boat is a prop for a film school short, whose director immediately calls out the trope: “What, you just thought a paper boat was just sailing down the river on its own?” He’s addressing us as much as Edgar. We should’ve known better: You’re the Worst doesn’t do cutesy.

The real catharsis comes when Edgar meets another vet, who happens to be the guy towing his car. Over a joint, Edgar gets exactly the empathy he’ll never get from his roommates and exactly the honesty he’ll never get from his handlers at the VA: “The military’s job is to sand down our humanity just enough that we can take a life,” the tow guy tells him. “That’s it. Afterwards, a totally separate branch gets to sort out these purposely broken motherfuckers … I know you don’t want to hear this, but the minute you stop looking for someone else to cure you, maybe that’s when you start living again.” That’s the last line of dialogue in the entire episode.

It’s not funny, but it doesn’t have to be. We’ll never see this guy, or even get this much of Edgar, again, but we don’t have to — we’ve been made to understand the extent of his pain, even as he’s been offered a path forward. “Twenty-Two” gives us all we need, and You’re the Worst has given us one of the best half-hours of the year.