Sharon Horgan walks into the darkened theatre space where she is rehearsing her new play. It's Friday lunchtime, just another working day – and she's wearing a skintight black mini-dress. It doesn't quite add up: she could have stepped out of a David Lynch movie. The comedian-actor-writer dabs at her upper lip. "I thought I'd make an effort. I'm fuckin' boiling in it, though. It's like having the menopause. I don't know how people wear leather."

Not many people do, I say. "Some people do," she says. "Elizabeth Hurley: leather trousers." It's the kind of exchange you could imagine her most famous character, Donna in Pulling, having. Horgan co-wrote and starred in the 2006 BBC series, which was indeed pulled after two series. "Two series and one special," Horgan corrects.

Pulling is about women behaving badly. Donna and her two friends Karen and Louise are around 30 and share a flat. They drink, take drugs, shag, puke, regret, then do it all over again. It's very funny. Horgan and co-writer Dennis Kelly set out to show women could be as reckless and feckless as men: Horgan's Donna dumps her fiance the day before their wedding because she's terrified of chucking her life away.

Pulling's girls return – as mums

It's a recurrent theme in Horgan's work: what if? What if there's something better round the corner? What if I've made the wrong choice? Horgan admits the subject obsesses her. Even now, at the age of 41 and happily married with two children, she can't help wondering if the grass is greener on the other side. She's about to star in the world premiere of Terrible Advice, written by Saul Rubinek, who played Daphne's lawyer fiance in the sitcom Frasier. And she's back in the world of what ifs. "It's about settling for people when you feel you've run out of choices. My character was a bit wild, and she's got to a point where she hasn't got anything of material worth. So this man comes into her life and helps her buy an apartment. That's why she's with him really. That sounds a bit grim but it is a bit grim, this play."

Horgan's great company: open, curious and honest in a way that leaves you wincing. She says if she were still single, she would also be settling for second or third best. "I'd be making choices based purely on my age, and I'd probably make bad choices." She's nibbling at a loaf I brought along. Is it harder for women at this age? "I think it used to be. I really expected there to be some sultanas in that bread, you know. It's really nice, but …"

Again, it's a comment that could have come straight from Donna. "There's way more pressure on everyone to have achieved a certain amount at a certain point," she continues. "Men don't have the clock ticking in the same way, but their sperms do go off, I think."

Another classic Donna-ism. In Pulling, she's needy, neurotic, vain and cruel but we still love her. She makes Karl, her former fiance, cry time and again. After she dumps him, he tries to hang himself. When it looks as if he's getting over her, she's devastated. "You're not moving on," she tells him. "You're having a breakdown."

Her characters generally make their men cry. In Angelo's, the 2007 series she wrote for Channel 5, she plays a police officer who blames her husband for their inability to conceive. "Dave's testicles are small," she tells the doctor. "Quite unusually small and tight. Really tight … about the size of a falafel." In Channel 4's Free Agents two years later, playing an experienced literary agent, she sleeps with a junior agent and again reduces him to tears.

You love making men cry, don't you? "I do, sorry." She laughs, a loud raucous laugh. "I never used to see anything on TV where the man was in the weaker position. It was always the female showing emotion, breaking down, being emotionally torn apart by men. And I just thought, 'Well, it's not always like that.' And I thought not only would it be good to show that, it would be funny. There's something funny about men crying."

Did she always finish with men? "On the whole, yes." And did they all cry? "No, but some of them did. Some men are criers." Actually, she says she's a bit of a crier, too. "I'll cry anywhere because I can do it quite subtly. Walking, that's a good time to have a cry." What makes her cry? "Just life, just things going wrong, small shitty things, or that feeling if you're having a bad day and you're trying to work out how it can get better and you can't."

She's always had a melancholy streak. There's a desperation in her work as she rages against the dying light of youth. This year, she made a pilot for a US comedy called Bad Mom, about young mothers clinging to the wreckage of their clubbing days; now she's working on a British version. "It's like if the Pulling girls became mothers. The mothers who come in at 5am and are greeted by the small child at the top of the stairs. I wanted to do something about mums who are not natural mums, who haven't grown up enough. They're getting through it, but they just can't quell that midlife crisis thing."

She can't leave her dress alone: tugging at the top, pulling at the bottom. Is she comfy? "Well, it's all right. I'm just aware of its shortness." Isn't it weird how so many women wear short dresses then spend their time being self-conscious in them? "It is, but that's because they look in the mirror when they're standing up and go, 'This looks good.' Then they sit down. You don't sit in front of a mirror looking at whether you can see your pants or not."

Another project is an adaptation of journalist Lorna Martin's book Woman on The Verge of a Nervous Breakdown, about a childless and partnerless woman approaching her 40s. "You're just constantly looking at everyone else and going, 'Are they happy? Is that right? I haven't got that, maybe I should have that.' That's all I'm thinking about, and everything I seem to write is about that. It just feels like we're fucked because it's only going to get worse. We're only going to get older."

The ugly truth about friendship

Horgan doesn't do happy endings or redemption or easy solutions (even when she half-heartedly masturbates her fiance in the opening scene of Pulling, he is left to clean up the mess using a leaf from the bedside rubber plant). The thing is, she says, people are essentially selfish, so why pretend otherwise? "I think I am a selfish person." In what way? "In the way most people are. I think of what works for me first. We wanted to show friendships aren't always a two-way, fulfilling thing. I despise shows that present friendship where you're always there for each other and really strong because I don't know anyone like that. I mean: I've got great friends, but I can go months without seeing them because I think, 'I just can't deal with having to give you anything.'"

Horgan lived in England for the first four years of her life, then in Ireland, her father switching from pub landlord to turkey farmer. In her 20s, she spent a lot of time with "bastards and arseholes", eventually realising this was no recipe for a fulfilling life. She refers me to Terrible Advice. "When Stanley asks my character Delilah to marry him, and her friend asks if she loves him, she can't answer." Love, she says, is such a complicated business. "You end up loving someone a lot more because there's so much at stake and there's so much shit between you. Whenever I talk to my married friends, no one's sitting around waxing lyrical about their husbands. I go, 'Who's touching each other? Who's hugging? Who kisses?'"

And do many? "No. In fact, me and my husband do a lot more, despite my grim appraisal." Unlike her, she says, her man (who runs an advertising agency) is a proper grown-up.

Horgan can be tough on herself. She still regrets the fact that she threw away her 20s working in a job centre and having a good time, even though she knows without that she might well have no material. Throughout this time, she continued to act in and produce plays, but she was on the verge of giving up. In the end, it was marriage that gave her the push she needed. "The big kick up the arse was getting pregnant and having kids." Why? "I realised I was an adult. I wanted to do something I could be proud of."

She tugs and pulls at the dress again. On the way out, I ask her if this is how she dresses to pick up her oldest from school. She grins. "God no. This is me just being a needy bitch."

• Terrible Advice is at the Menier Chocolate Factory, London SE1, 22 September to 12 November. Box office: 020-7378 1713.