Justin Kirk is to play a recurring role in Showtime's half-hour comedy "Kidding."

The 10-episode series is to star Jim Carrey, Catherine Keener, Frank Langella and Judy Greer. It follows Jeff, the host of a popular children's program, as his home life spectacularly falls apart.

Kirk, who starred on "Weeds" and "Angels in America," will play Peter, the new boyfriend of Jeff's estranged wife Jill, played by Greer.

"Jeff finds no fairy tale or fable or puppet will guide him through this crisis, which advances faster than his means to cope," a synopsis from the cable network said.

"The result: A kind man in a cruel world faces a slow leak of sanity as hilarious as it is heartbreaking."

Michel Gondry -- with whom Carrey collaborated on the film "Eternal Sunshine of the Spotless Mind" -- is producing and directing the project.

Dave Holstein wrote the pilot and serves as showrunner.