When you get tired of such holiday classics as “Miracle on 34th Street,” “It’s a Wonderful Life” and “How the Grinch Stole Christmas,” you can pop in the instant holiday classic, “Filth.” Like all the best family movies, it’s based on a novel by Irvine Welsh, who is widely regarded as the Scottish Santa.

Well, maybe that’s not exactly accurate. “Filth” is in fact a trippy, depraved, vile account of a mentally ill Scottish policeman and his descent into alcoholism, drug abuse, and madness. It does take place around Christmas though. Depending on how high male nudity ranks in your family holiday traditions, this is borderline inappropriate for viewing in that context.

James McAvoy delivers a spotless performance in “Filth.”

James McAvoy delivers a spotless performance in “Filth.”

It’s pretty gross and hard to watch, except that James McAvoy’s performance as Bruce is so amazing and riveting that you have to. “Tour de force” is usually a code word for “overacting” but he really earns the description in this one.

The story concerns Bruce’s quest to earn a promotion on the police force, and an unsolved homicide brings all the candidates into direct competition. The tone begins as rather a dark comedy, as Bruce sets his various competitors up for failure. This is glib and amusing, but when true problems bubble up beneath McAvoy’s cruel exterior, the film becomes more interesting.

He is ably assisted onscreen by a nice mixed bag of fellow officers, especially Eddie Marsan as his meek, bespectacled best friend. Also, Imogen Poots showed up — if you’ll remember my recent review of “A Long Way Down” you’ll realize I seem to have found myself in an Imogen Poots marathon suddenly.

Amid grimy scenes of sex, drugs and boatloads of vomit, a stylized thread of hallucinations begins to haunt Bruce and us, and we realize he’s not simply a disgusting jerk, but a truly ill and terribly damaged disgusting jerk. Stylistically and thematically, this concept elevates “Filth” about men behaving badly.

As an emotional touchstone in a sea of depravity, a young widow, played by Joanne Froggatt (“Downton Abbey”) is a lone, angelic presence in his life. We also realize that Bruce may or may not have a wife and child somewhere, but their whereabouts become increasingly jumbled with his hallucinations. They constitute just one of the many questions we wince over as we await the answer.

“Filth” does not pack the memorable visual punch of Welsh’s far more famous book to movie adaptation, “Trainspotting,” but McAvoy’s performance is on par with any from that seminal work. If anything, the shocks delivered by “Trainspotting” have long since created a cinematic world where the nauseating hijinks depicted in “Filth” no longer stun the viewer. What is stunning, however, is the truly convincing and harrowing depiction of insanity displayed by James McAvoy.