Jason Segel is responsible for two of the most cringe-inducing moments in recent TV history, both from NBC's Freaks and Geeks. On the episode "I'm With the Band," Segel's bright-eyed burnout, Nick, imagined himself an arena-sized drummer behind his basement-bound 29-piece kit, where he'd jam along to Rush's "The Spirit of Radio" cranked through NASA-sized headphones. But he couldn't keep the beat if it were on a leash, and he spazzed out during an audition, finally breaking down and accepting tearful defeat. Which was nothing compared to the time when he wooed his love interest by sing-speaking along to Styx's "Lady." It's still a singularly heartbreaking and hard-to-watch scene — a garish, sincere spectacle.

That character was nurtured by Judd Apatow, and the actor, an Apatow regular in efforts like Undeclared and Knocked Up, has more or less offered variations on Nick ever since — the huggable lug and/or schmaltzy stoner for whom no gesture is too outsized. The guy puts it all out there.

It takes all of five minutes for Segel to drop towel in the new Forgetting Sarah Marshall: His character, Peter Bretter, is on the verge of being dumped by his longtime girlfriend, middlebrow-TV actress Sarah Marshall (Kristen Bell). But she won't actually break up with him until he puts on some clothes, and so . . . he doesn't.

The scene elicits big, dumb laughs. That dude's naked, haw haw. But there's also some sad, sweet truth that manages to linger: Absolutely, Sarah would have bailed on Peter the moment he put on his pants. So it's up to Peter, and his peter, to stand there as long as possible, daring her to walk out while he's as vulnerable as it gets — flabby, pasty, and stark-effin' nude. Segel, who also wrote Forgetting Sarah Marshall, has learned at least this much from Apatow (who produced Marshall): You don't play to the audience, but to characters in the scene — in this instance, the love of Peter's life for five years, for whom the sight of him naked and whining probably ain't all that unusual.

Even if his movie visits familiar territory, Segel's willing to go to dark, weird places his contemporaries won't. Peter fits neatly into the Apatow catalog of screwed-up, stunted, crybaby man-boys, but he's also Bruce Jay Friedman's Lonely Guy — nothing more, or less, than a misfit and a mess.

Eventually, of course, he meets the woman who puts him back together: Rachel Jansen (Mila Kunis), a receptionist at the Hawaii hotel to which he retreats. The film ultimately adheres to the romantic-comedy formula, which demands we root for Boy to get Girl — any girl, so long as he winds up happy by the end credits. Rachel's as good as any: She's a smart, tough stunner who initially takes pity on pathetic Peter before realizing he's a good guy done wrong by Sarah. But their scenes together feel like cogs in a romantic-comedy machine that also finds Sarah hooked up with a loutish British pop star named Aldous Snow (Russell Brand), for whom leather pants are perfectly suitable beach-vacation wear. (Though, to be fair, Brand's a rather brilliant comedian and no small asset to the picture: Where Segel could have written Aldous as cruel or stupid, he's a rather clever, self-aware chap — a character, in other words, and no mere caricature.)

Several members of Apatow's troupe of regular irregulars also show up: Paul Rudd as a bottle-bleached surfer spouting stoner aphorisms, Jonah Hill as a waiter with a desperate man-crush on Aldous, Bill Hader as the stepbrother cajoling Peter to get on with what little life he's got. But without Segel, Forgetting Sarah Marshall would have been forgettable and, one might even say, limp.