The last time Jim Carrey and Michel Gondry collaborated, they produced some of the best work of their respective careers. “Eternal Sunshine of the Spotless Mind” gave Carrey a chance to deepen his performance beyond his usual caricature, while Gondry found space for sharp moments of humor within his gauzy dreamscapes. So the prospect of these two coming back together after almost 15 years apart was an exciting one.

The result is “Kidding,” Showtime’s new drama slash comedy from “Weeds” producer Dave Holstein, about a kid’s show host trying to stay positive through a fog of grief no less. It tries to capture the kind of strange and bruising tone that made “Eternal Sunshine” so good; sometimes, it even succeeds. But more often than not, “Kidding” feels caught between too many tones and ideas to become quite as distinctive as it could be. The series vacillates between uplifting anecdotes about the endless possibilities of kindness and deeply depressing shots of existential bleakness — sometimes on purpose; sometimes, not so much.

At the heart of “Kidding” is Carrey’s Jeff (or “Mr. Pickles,” depending on his mood). No matter what he’s doing or who he’s meeting, this Mr. Rogers facsimile faces the world with a benign smile, his head tilted to exactly the right angle with which he can say “how are you,” “you’re like no one else,” and “I’ve got you” all at once. Well-honed over 30 years of fronting “Mr. Pickles’ Puppet Time,” this stance has made him the patron saint of childhood delight. But a year after one of his twin sons died in a freak car accident, he is closer than ever to cracking under the pressure of trying to stay in one piece, whether he wants to acknowledge it or not.

In the show’s first two episodes, spiky scripts from Holstein and lightly surreal direction from Gondry emphasize the enormous gulf between the optimism radiating from Mr. Pickles and the real world nihilism surrounding him. Jeff’s ex-wife, Jill (Judy Greer), shuffles through the house where they once lived as a happy family with deadened eyes, releasing her grief in waves of fury that he does his best to blink away. His surviving son, Will (Cole Allen), has started adopting his brother’s rebellious streak, rolling his eyes at the magic tricks he once loved and pushing his father’s bleeding heart away whenever he offers it up.

But Jeff can’t even retreat to the once safe haven of Puppet Time for a respite. The acerbic mastermind behind the puppets is his sister, Deirdre, who’s going through her own family crisis of faith. And his father, Seb, is the show’s ruthlessly pragmatic producer (Frank Langella); he wrinkles his nose at Jeff calling viewers “friends” and refuses to entertain Jeff’s desire to be straightforward with children about tough topics like death.

Everyone orbiting Jeff, in other words, is an exhausted shell of a person. Jeff keeps trying to smooth down their rough edges, insisting that kindness is a kind of magic and someday, they’ll let themselves understand that. But it’s unclear whether or not “Kidding” truly believes that Jeff’s doing them a disservice by glossing over their hurt in his quest for finding the silver lining in every darkened cloud.

There are a couple glancing attempts to recognize this, especially as Jill tries to do the verbal equivalent of grabbing her ex-husband by the shoulders and shaking him into admitting he’s miserable. But despite Greer’s best efforts (and she is as great as ever), “Kidding” nonetheless portrays her less as a voice of reason than an acidic killjoy dating some new guy (Justin Kirk, practically unrecognizable with silver hair) who wants nothing more than to make Jeff hurt. “Bitter ex-wife” is a disappointing trope for the show to lean on, and even when it tries to flesh her out, “Kidding” inevitably has her snap back into her original formation like a rubber band that can’t help but retract.

The show takes a thematic turn after Holstein and Gondry step away to let others write and direct. Jeff’s quest to sow decency throughout a cold world largely gets abandoned in favor of him trying to assert his individuality and rebelling against the confines of being the placid “Mr. Pickles.” This is a perfectly reasonable avenue to explore, but it never quite clicks — and the problem lies with Mr. Pickles himself.

As Jeff, Carrey does his best to embody the conflict of his character existing in a liminal place between pleasant cartoon and flesh-and-blood human. (At one point, Jill demonstrates that she knows how to wound him by calling him “Santa Claus” through a sneer.) Depending on what the scene calls for, he swings between being a thoroughly kind adult who just wants to make people smile and an astonishingly childlike naif who thinks his flip phone is broken when a woman doesn’t text him back right away.

It also becomes clear over the course of four episodes that “Kidding” understands the idea of Mr. Pickles, the smiling “$112 million licensing industry of edutaining toys, DVDs, and books” far more than Jeff, the “separated husband and grieving father who needs to hammer out a few dents in his psyche.” And despite his father’s insistence that there is a firm distinction between the two, the scripts and Carrey’s performance suggests otherwise.

As Jeff tries to move forward through the sludge of his grief, he keeps getting stuck. He’s caught in a loop trying to bridge the gap between his Technicolor puppet utopia and the rapidly graying reality surrounding him. And so, it seems, is “Kidding.”

Comedy-drama?: Showtime. (10 episodes, four reviewed.) Premieres Sunday, Sept. 9.

Cast: Jim Carrey, Judy Greer, Frank Langella, Catherine Keener, Cole Allen, Justin Kirk, Ginger Gonzaga.

Crew: Executive producers: Dave Holstein, Jim Carrey, Michel Gondry, Michael Aguilar, Roberto Benabib, Raffi Adlan, Jason Bateman, Jim Garavente.