In the film “Entertainment,” Gregg Turkington plays a comedian grinding through a surreally low-level gig circuit and beginning to suffer delusions and near-catatonia.

He is a variant on Neil Hamburger, Mr. Turkington’s hapless-comedian persona since the early 1990s. First Neil Hamburger existed only in recordings, with a fake audience, on albums mixed and designed with artful ineptness. (He chose microphones and tone quality specifically to achieve the sound of a depressed man in an empty room.) By 1999, Mr. Turkington was playing the character to real audiences: a middle-aged teller of sour one-liners with an outdated frame of reference, barely restrained pain and anger, Pat Moynihan-like glasses, tuxedo and ghastly comb-over. The jokes tend to be soggy and offensive, but Mr. Turkington’s delivery has become sharp and sensitive. He is interested in failure, but also, on some level, in radical empathy for a character like the one he’s portraying.

The film, with a screenplay by its director, Rick Alverson, Mr. Turkington, and the comedian Tim Heidecker, is Mr. Turkington’s first major film role. (He has had small parts in “Ant Man” and other movies; he can also be seen in the Adult Swim web series “On Cinema,” also with Mr. Heidecker, playing a movie “expert” named Gregg Turkington who is basically precritical: He likes everything.) He has only recently begun to talk on the record about the psychology and preparation for his Neil Hamburger character. Here are edited excerpts from our recent conversation.

Q. In the movie, your character is not Neil Hamburger, even though at one point he is called Neil and some of his material is old Neil Hamburger material. Otherwise we know little about him beyond a couple of details. He has a daughter who won’t return his calls.