Maria Bamford’s off-center comedy will be seen at the Second Annual Women in Comedy Festival, to be held March 24-28 in Cambridge and Boston.

The Second Annual Women in Comedy Festival has a headliner: Maria Bamford, who proves that with lightning-fast wit, keen observation, a total lack of vanity and an impressive array of dead-on impersonations, you can wrench hilarity out of near-debilitating depression and abject failure.

Her participation was announced Wednesday with some other festival details. But adding Bamford to the line-up is a coup.

Although she squeezes comedy out of dropping out of society — claiming at the start of her Web series, for instance, that in 2006 she was “onstage at the Friars Club in Los Angeles when she suffered a nervous breakdown … disappeared for three months [and] retreated to her parents’ home in Minnesota” — Bamford, 37, is experiencing some solid success. In addition to touring as a comic, she is in the Comedy Central series “The Comedians of Comedy Tour,” appears in movies and on television, does regular voice-over work and has even performed in a series of ads for Target. (The comedy album she released last year, “Unwanted Thought Syndrome,” is on The Onion A.V. Club’s list of best comedy albums of the decade, and she’s blurbed plenty by other comics and lists.)

Visitors to the March 24-28 festival, though, should expect to see her embrace the horrors of life, even as she admits she’s a fairly happy person.

“My sister said, ‘Why do you tell jokes like you’re some loser when you have a boyfriend, and own a house?’,” she told TimeOut New York. “I do an impersonation of the kind of comedy I think people want, and it turns out they actually do. They go, ‘You should do more of that, it’s funny.’”

Appearing with Bamford at the festival is Jackie Kashian, of “Last Comic Standing”; Bonnie McFarlane, of “HBO’s One Night Stand,” “Comedy Central Presents” and “The Late Show with David Letterman”; and plenty of local talent, including Kelly McFarland, of “Comedy Central’s Premium Blend” and NBC’s “The Biggest Loser” and Giulia Rozzi, who’s appeared on VH1, MTV and “Jimmy Kimmel Live.”

“The festival’s mission is to create a forum for people to experience the comedic expression of women, see strong female performers and, most importantly, to entertain,” said Maria Ciampa, one of the festival’s organizers. “Most comedy festivals feature about 80 percent men and 20 percent women. Our festival flips this tradition on its head. The ‘women’ in Women in Comedy Festival refers to the fact that WICF is directed by, produced by, and features comedy by the ladies.”

“However, men do comedy too, and we don’t want to exclude anyone,” she said.

In addition to stand-up comedians, the festival schedule includes improv and sketch comedy groups and writers and filmmakers in panel discussions and workshops open to the public.

The co-directors (Ciampa, Michelle Barbera and now Elyse Schuerman) also announced Wednesday an  “exciting new partnership”: This year the festival is teaming up with the historic Friars Club of New York, which will present the WICF Audience Award winner and invite the winner to perform.

Festival shows take place at ImprovBoston, 40 Prospect St., Central Square, Cambridge, reachable by phone at (617) 576-1253, and at Mottley’s Comedy Club, 61 Chatham St., near Faneuil Hall in Boston, reachable at (877) 615-2844. Tickets range in cost from $10 to $35 for adults and $7 to $15 for students and seniors. A VIP festival pass is $65. For details, visit the festival Web site by clicking here.

Until the festival begins, you can enjoy Bamford’s miseries in Minnesota in the first episode of “The Maria Bamford Show,” available on YouTube.