Frances McDormand as Olive Kitteridge. (Jojo Whilden/HBO)

She seems like such an unpleasant and perplexing person, Olive Kitteridge, until you start to recognize yourself in her.

Or maybe you don’t.

American culture, after all, has spent considerable time and money promoting a positive attitude in all things, as if good cheer can solve any problem. Cancer can be willed away by enough pink ribbons. Football games can be won by banishing negative thoughts and asking for divine intervention. Celebrities speak candidly of ways they’ve learned to shun “negativity.” Bad news is buffed to a shine, vanquished by yoga and kale smoothies and daily affirmation. The chipperest among us envision and achieve success, reserving special pity for the cynics, the cranks, the doubters. There was a time when such realists got dinged on our report cards for what was termed “an attitude problem”; now they simply call us “haters.”

Which is one reason I’m so pleased that HBO’s two-night miniseries “Olive Kitteridge” (premiering Sunday night and concluding Monday night) so ably translates the woman at the center of Elizabeth Strout’s 2008 novel of the same name. We deal with and even glorify a number of antiheroes on TV these days (most of them the “difficult men,” but not all — have you noticed how despicably Carrie Mathison has behaved this season on “Homeland?”), yet almost no one seems to know how to portray the life and thoughts of what some might call a negative person.

“Olive Kitteridge,” then, is a miniseries for the rest of us — and it’s a gloriously thoughtful wallow in the subtle and sometimes even insecure ways that families and friends relate to one another. Frances McDormand, who was instrumental in bringing the novel to the small screen, stars as the title character and delivers a performance as good as or better than her finest work on the movie screen. Olive is a role she was meant to play — “resting bitch face” and all.

Hopscotching back and forth from the late 1970s to sometime in the 2000s, “Olive Kitteridge” is about a retired junior-high math teacher in the fictitious coastal village of Crosby, Maine. Olive’s long marriage to Henry (“Six Feet Under’s” Richard Jenkins), the town pharmacist, seems built on the tired truism that opposites attract: Henry is ceaselessly sunny and happy to engage people in conversation; Olive’s moods border on the misanthropic. She prefers to mutter under her breath or punctuate each sentence with an “Oh, for God’s sake!” She dishes out criticism and marks up tests with an apparent disregard for hurt feelings or empathy. “Well, ducky duck soup” is the best you’ll get out of her when you complain about life.

That she’s mostly right about people is of little succor in the long run. She’s no one’s idea of Teacher of the Year or even a favorite neighbor. The Kitteridges’ teenage son, Christopher, picks up on the fact that his mother isn’t well liked, and he internalizes her criticisms and aloofness as a lack of love. As a grown-up (played by “The Newsroom’s” John Gallagher Jr.), Christopher finds comfort in therapy, which assures him he was raised by a bad mother.

Olive herself finds no use in psychobabble and shuns the idea that she might become a better, happier person with the help of antidepressants. You can feel the pressure on her to find something nice to say, to remain pleasant in the face of so much fakeness and mediocrity in the people around her. It’s for this reason alone that I can imagine viewers flipping away from “Olive Kitteridge” — she’s too much like the sourpuss we’re all either related to or were once friends with. Dropping her seems easier than changing her.

But viewers who stick around will come to know Olive better and more deeply in what is essentially a four-hour portrait that relishes both complexity and ambiguity. We get to know Olive from many subtle sides, including the side that is wickedly funny and, beneath the Grinchiness, essentially kind. The teleplay is written by Jane Anderson, and the project is directed by Lisa Cholodenko (“The Kids Are All Right”); with McDormand’s help, they’ve carved gently into Strout’s novel and come away with an enhanced through-line about a woman who is never as bad as she seems.

It’s the little hurts and stray acts of kindness that make Olive human — when she overhears remarks about what a foul person she is and reacts by swiping a few of her daughter-in-law’s belongings, or when she’s tempted to have an affair with a colleague (Peter Mullan) but doesn’t act on it. Or when she recognizes the potential in a student whose mother struggles with manic depression and encounters him again as an unhappy adult (played by “Gotham’s” Cory Michael Smith) and the two regard one another with an uneasy acknowledgment of the darkness they’ve both known.

It’s a downbeat story all the way, enhanced by the harshness of Maine’s seasons and the encroaching loneliness of old age. To this, add the haunting musical contributions from Angela (Martha Wainwright), a piano-playing lounge singer who migrates from her gig at the local steakhouse to serenading the residents of the local nursing home. (She turns Olivia Newton-John’s 1980 hit “Magic” into a powerfully understated dirge.)

Some excellent makeup work ushers McDormand, who is 57, into her 60s and 70s, but she so naturally wears those years like a favorite old shoe, inhabiting old age in such a fearless way that she hardly needs the extra liver spots that have been applied to her hands — though it is a nice touch.

As mortality begins to shadow Olive’s world, she considers joining her father and others who chose the hollow New Englander’s pragmatism in suicide (“I’m waiting for the dog to die, so I can shoot myself,” she says). At her lowest point, Olive encounters a relative newcomer to Crosby, a wealthy Rush Limbaugh-listening widower (Bill Murray) whose mild disdain for the world around him is vague echo of Olive’s misery. The two aren’t meant to be together, but for the moment, they have the mutual assurance that people, on the whole, are no damn good.

“Olive Kitteridge” proves once more that some of the best stories to be told in TV and film run counter to our most familiar coping mechanisms. “The Leftovers,” for example, shooed away viewers who couldn’t abide its relentlessly depressing worldview. “The Comeback,” which HBO is bringing back next week, is regarded by most as a hilarious satire of show business, but some of us never forgot that “The Comeback’s” strongest note was one of deep unhappiness and even deeper insecurity. So, too, with “Getting On,” beginning its second season next week; it’s set in the geriatric wing of a hospital and, while uproariously funny at times, also has a callous and even disturbing regard for cheer.

All of which is to say that “Olive Kitteridge” is bound to repel those who immediately sense the presence of an enemy, a thing that wishes to drag them down for four hours instead of lift them up. Well, ducky duck soup to them. Maybe it’s the hardened critic in me, but I get Olive Kitteridge. I totally, completely get her.

Olive Kitteridge (four hours in two parts) begins Sunday at 9 p.m. on HBO; concludes Monday at 9 p.m.