Joanna Scanlan recently came across all the rejection letters from agents who declined to take her on after she left university, her heart set on becoming an actor. They seem strange mementoes to keep from what she remembers as a deeply unhappy time, some 30 years ago, but in retrospect they serve as one of those reminders that sometimes timing is everything, and people can be very wrong. "At the time I didn't know how to deal with that – I just thought: 'OK, they're probably right, I haven't got anything to offer so I don't quite know what I'll do next'," she says. "I didn't know how to fight for anything, or work in any way strategically. I just thought 'I'm no good'."
From there, struggling in her early 20s, to here – her career really taking off in her 40s and now early 50s – seems counterintuitive when many actresses complain of roles drying up past 40. Imagine if Scanlan really had given up. We wouldn't have her appearances in some of the best series of the past decade, including The Thick of It, where she first made her name after years of smaller parts, and Getting On, the NHS comedy that she also co-wrote.
We meet in a London hotel. She is warm, and quick to laugh – a great booming "ha-ha" – but thoughtful and reflective too. Her latest role, as Charles Dickens's wife in The Invisible Woman, based on Claire Tomalin's book about Dickens's secret mistress, feels like a bit of a departure from her more monstrous characters. Where The Thick of It's press officer Terri Coverley was intransigent and fairly useless, and Den Flixter, the ward sister she played in Getting On, was delusional and vastly irritating, Catherine Dickens is a much put-upon and deeply moral woman, treated appallingly by her famous husband. Scanlan plays her with such heartbreaking dignity she's in danger of stealing the show from Ralph Fiennes's exuberant writer, and Felicity Jones as his complex mistress.
"I tried to think about her physically more than anything else," says Scanlan. "She had had 10 children and indications are she had probably suffered postnatal depression. I tried to think of her as somebody exhausted by child-rearing, by grief – she had lost one child – and yet she had to keep up this really rather proper business of being Mrs Charles Dickens. What had women to do but support men at that time? Women were chattels up to a point and their role in life was to be mothers, wives or whores. And you get the spectrum in this film."
There is a scene where Catherine is made to deliver a bracelet to her husband's mistress, the trauma of the situation devastating to both. For his part, Dickens "comes over as a bit of a shit in this film, but he's not wholly that. He is complex. There is a lot of forgiving of geniuses for their moral failings." Scanlan had wanted to be an actor since she was a small child. She remembers being asked to recite a poem by Walter de la Mare during a school production, when she was about four or five, "and I remember the sensation of being in the imaginative space of the poem and not being in the real world, and I just loved that feeling. That remains the case – that I think I prefer the imaginative space to whatever is going on for real." It was always that escape – rather than a need for applause or attention – that drove her, she says.
It sounds like an idyllic childhood in the countryside with a lot of animals, and Scanlan and her two brothers "running around completely wild, with no cars, just fields". Then, when she was 13, her father bought a hotel in North Wales and moved the family into it. It was a contrast, but Scanlan loved it, working behind reception and helping out in the bar. But by now, knowing that it was possible to make a living as an actor, that was what she had set her heart on.
It seemed to be going well. She did drama all through school, then when she was at Cambridge she joined Footlights. "So it was a shock when I left university and then couldn't work out how to be an actor." There were those rejection letters, and failed auditions. The years that followed were swallowed up by depression, she says, "really properly not really managing".
But she still wanted to act, so she volunteered with local community theatre projects in London, unable to find a job, and ended up directing plays, which led to a drama teaching post at what was then Leicester Polytechnic, where she stayed until she was 29. And then, she says, "I had a nervous breakdown, completely. I kind of collapsed. I went to see the doctor who asked me a few perspicacious questions and said, 'Well, I think if you don't go back to acting you'll be ill for the rest of your life,' and as he said it, I thought: 'Yes, I think that's true'."
The way she talks about it, so matter-of-factly, it would be easy to underestimate the impact of it on her life. She had to leave her job and moved back to North Wales to live with her parents. Then, when she was well enough, she rented a cottage nearby. For a whole year, she says, all she did was walk the dog, occasionally do her mum's shopping for her and cry. "Eventually, I thought, when I was feeling a bit better, I'll go back and start again. It was quite a long, convoluted process, a bit like turning around a liner across the ocean. And as I say, it was just hugely embarrassing and awkward."
It can't have been easy though, seeing her university contemporaries go on to success (Tilda Swinton is one friend). She smiles. "Yes, well it was with them that I found it most embarrassing because it felt like I was like a little sister at the back saying: 'Wait for me, can I come too?' It felt like I was trying to join in a party that I wasn't really invited to."
At that point, Scanlan was 30, and she didn't get her first professional job until she was 34, playing a midwife in the TV series Peak Practice. How did she deal with the inevitable rejection during that period? "Actually, I felt more resilient and I thought: 'I haven't got a choice now. I'm never going to survive if I can't be a creative person on a daily basis, it just won't work for me.' I thought I've just got to … Sorry, I'm getting a bit upset." There is a sudden quietness in the room and it looks as if she's about to cry. " It just felt like I didn't really have that choice any longer. I think that's an age for a lot of people coming up to 30; things become clearer. You've not yet necessarily got the experience to pull it off, but you suddenly think: 'I need to make a change'. Even if I'm a complete failure, it doesn't matter. Every day that I act or write is a day I'm 10 times happier."
Except she is far from a failure, though too modest – or perhaps too aware that it sounds like a cheesy fairytale ending – to describe being anything other than grateful for her life now. And it does sound lovely – living in south London with her husband and dog, writing television series with her friends, with interesting job offers coming in. If she does feel vindication, it seems to be quietly.
Until her acting career took off, Scanlan worked at the Arts Council, a job that she would later draw on for The Thick of It. In the early 90s, she says, the Arts Council "had a lot of ways that were quite similar [to government departments] – bureaucratic, strategic, duplicitous, self-seeking, egotistical. All those things I had witnessed and been part of and I'm not saying I wasn't part of it myself, I probably was."
During that time, she would spend her evenings and weekends writing scripts, "because I thought I might be able to write myself parts". She got jobs writing for the children's series Byker Grove and My Parents are Aliens, "and lots of development projects that came to nothing for many years. Here are the facts: I started writing in 1991 and had a hit, if you want to call it that, in 2009." She laughs. "Call me muggins in terms of carrying on at it. It takes a long, long time and you've got to enjoy it for its own sake, otherwise, God, the rewards are few and far between."
That hit was Getting On, the dark satirical comedy set in an elderly-care NHS ward which Scanlan wrote with Jo Brand and Vicki Pepperdine. It had a small audience, but was critically acclaimed. It was brilliant – one of the most comically bleak, but always humane, series of recent years, and as close a peek at the NHS, with all its wonderfulness and shortcomings, and the threats of looming cuts and creeping privatisation as you could get. Scanlan says she has always been "quite politically minded. I had gone to a convent between nine and 13 and it was very social justice-minded and I think I picked up a lot there. I did feel life was extremely unfair to many people and it was important that it was fairer and at a simple level, that's my interest in politics."
They were writing it at the same time as the then health secretary Andrew Lansley was planning NHS reforms, and they had a lot of help from the trade union Unison – as well as people within the NHS, including nurses, doctors, porters, delivery drivers – to work out where the cuts would likely hit. "I do believe that the application of the MBA model to every aspect of our lives is not appropriate," says Scanlan. "Why should a hospital run in the same way a business runs? I don't get that. I know there is the argument that efficiency is best driven by the motivation for profit but I don't believe it."
Sadly there won't be another series – at least not this year – because Scanlan and Pepperdine are writing and filming another show about dog training, starring Millie, Scanlan's Battersea Dog's Home rescue staffie. She is also in the new series of Rev – another of the best TV comedies of recent years. Does she remember the point in her career when she thought, yes, that decision to start again was the right one? "Oh, I thought that from the day I started." She smiles. "The fact I'm even going to an audition was a success. The day I can just be within the profession at all, at any level, that is my success and anything else is icing on the cake."
The Invisible Woman is in cinemas on 7 February in London and 21 February nationwide.