If Howard Wakefield had been addicted to one TV show in the last decade, I bet it would have been “Breaking Bad.”

I think Howard would have identified with Walter White. Like Walter, he’s a middle-aged man with a lovely, independent wife; two children; a comfortable home, and a seemingly stable and set existence.

When Walter’s life careened into madness and he morphed into an entirely different creature, I could see Howard understanding Walter’s motivations on some level.

Not that mild-mannered attorney Howard Wakefield becomes a feared and legendary meth cooker — but he DOES leap at the chance to reinvent himself while still staying connected to his previous life.

Bryan Cranston is the actor who played Walter White and he is the title character in “Wakefield,” and in this haunting, darkly funny and elegiac mood piece, Cranston once again displays a nearly unparalleled ability to make us like and care about men who are selfish and impetuous and reckless — yet still seem to have a core of decency buried deep within.

Writer-director Robin Swicord adapted “Wakefield” from a 2008 short story by E.L. Doctorow. It is set in present day, but it’s reminiscent of mid-20th century short stories and novels by the likes of John Cheever and John Updike — tales of upper-middle-class men of a certain age who had it pretty damn good, but were forever seeking to assuage their sense of unrest and mortality, whether through a bottomless glass, an affair or some other ill-conceived flight of fancy.

Wakefield doesn’t drink to excess or fool around. He simply drops out of his own life.

After chasing a raccoon into the attic above his garage one night, Wakefield discovers he has the perfect vantage point to spy on his own home life. He has “Rear Window”-type views of the kitchen, the master bedroom, etc.

Wakefield decides to spend the night in the attic rather than get into a predictable fight with his wife Diana (Jennifer Garner). The next morning, he watches as Diana makes lunches for their twin daughters, sends them off to school, etc., while she clearly must be wondering what happened to Wakefield.

Thinking her husband might have come home late and left early for work, Diana calls his law firm in Manhattan and learns he hasn’t shown up and no one has heard from him.

Diana tries Wakefield’s cell. She sees his car is still in the garage. She calls her mother (Beverly D’Angelo), who rushes over, and she calls the police, and she cries.

Wakefield observes all of this, and has a revelation — or should we say breakdown? In voiceover narration, he rationalizes his decision to take a break from his life, champions himself as a rebel and proceeds to set up camp in the attic, letting his beard grow, becoming disheveled and ratty, scavenging for food and basically becoming a homeless man and a missing person while still spending most nights so close to his family he can practically overhear their conversations.

In flashbacks, we learn about Wakefield’s courtship of Diana — or rather, Wakefield essentially stealing Diana from his best friend (Jason O’Mara). He paints a picture of Diana that’s equal parts worship for her tender heart and her consuming love for their children and her great beauty, and resentment for the manner in which she flaunts her attractiveness and flirts with their party guests and picks at him for his failings.

(What a fine performance by Jennifer Garner, playing a character we see almost totally through the filter of her husband’s viewpoint. It’s an underwritten role, but in brief moments, often with little or no dialogue, Garner conveys Diana’s strengths and her vulnerabilities.)

As the months wear on, as Wakefield’s beard grows and he grows more pathetic, Diana begins to reconcile with the likelihood he’s gone forever. It stretches credulity that Wakefield can spend months without being discovered, but just when we’re getting restless with the situation and we’re ready for Wakefield to either fade away forever or return to the family, writer-director Swicord wraps things up.

And that’s all you’re getting from me about the ending.

★★★1⁄2

IFC presents a film written and directed by Robin Swicord, based on the short story by E.L. Doctorow. Rated R (for some sexual material and language). Running time: 109 minutes. Opens Friday at Landmark Century Centre.