There’s dark comedy, and then there’s take-no-prisoners, dare-you-to-keep-looking dark comedy. Kristen Wiig’s “Welcome to Me” falls decidedly in the latter category, making us laugh but feel deeply unsettled about doing so.

That’s because the film, directed by Shira Piven, is about mental illness, a decidedly unfunny subject. On the other hand, if you’re going to try to make mental illness funny and heartbreaking at the same time, it’s a good idea to have Wiig in your corner; the actress is not only one of the most talented comediennes of her day but one of the boldest and bravest. And this is a performance that’s naked, in more ways than one.

Wiig plays Alice Klieg, who suffers from a mental condition currently described by her shrink as borderline personality disorder. She lives in an apartment filled with swan-themed tchotchkes, old VCR tapes of Oprah shows, and yellowing piles of lottery tickets.

But one day, wouldn’t you know it, she actually wins the Mega-Millions lottery — an $86 million jackpot. And thus it begins. Alice tells her doctor (played, tongue in cheek, by Tim Robbins) that she’s going off her meds. Not a good idea, he tells her. “It’s a new era,” she replies. “Eighty-six million-dollar Alice.”

If you had $86 million, what would you spend it on? Alice’s heroine is Oprah, and she believes her special calling is to be a talk-show host. After hijacking a live infomercial broadcast to tell her story, jumping onstage as the stunned producers debate what to do, she marches into their offices and offers them $15 million.

“I want a talk show with me as the host,” she says.

“What do you want to talk about?” they ask.

“Me,” she replies. “Oh, and I want to come in on a swan boat.”

The owners of the struggling production company, brothers Gabe (Wes Bentley) and Rich (James Marsden), have no choice but to accept, since they need the funds. The scary-bad reality show that ensues has Alice regaling viewers with long minutes of her eating an iced meatloaf cake (she’s on a high-protein diet), opining about oral sex, and wreaking vengeance on mean girls from her high-school days by re-enacting scenarios with hired actors.

She also decides to spend hours neutering pets on-air (she once worked for a veterinarian) — “Let’s castrate!” she begins. Soon, things spiral out of control; there’s a rather terrifying scene of her wandering, aimless and rudderless, bare in many ways, and utterly alone.

A uniformly terrific cast has been assembled to play the various people in Alice’s life. A wonderfully sensitive Linda Cardellini is Gina, Alice’s loyal best friend who tries to help blunt her excesses. Marsden is especially entertaining as the slick, profit-minded studio owner. Bentley is touching as his brother Gabe, who forms an actual relationship of sorts with Alice.

For an extra bonus, there’s an angry Jennifer Jason Leigh and a wisecracking Joan Cusack as Deb and Dawn, crewmembers who endure the insanity, both figurative and literal, of working on Alice’s show.

One wishes these excellent actors had meatier parts. But it makes sense that they don’t, because everything is about Alice and her disturbing Wonderland, of course.

Director Piven and screenwriter Eliot Laurence (the producers include, by the way, Will Ferrell) are trying to say something, to be sure, about the ever-deepening navel-gazing in our culture. But it’s hard to forget that this is about mental illness. At any minute, you’re apt to wonder: Shouldn’t they be stopping Alice? Shouldn’t WE be stopping her?

But we don’t want to, because Wiig is so darned entertaining. Alice may be hard to watch at her worst moments. But she’s harder not to watch.