Image caption Gemma Doyle lost what had once been seen as a 'safe seat' in 2015

How long does it take to get over the shock of losing your job as an MP? A year, two days?

Inevitably some MPs - such as former Liberal Democrat leader Nick Clegg and former SNP leader Alex Salmond - found themselves out of a job in the early hours of this morning - and it can be tough to take.

A study by the Open University Business School didn't beat about the bush when summing up just how difficult it can be for some MPs to leave office.

It included an anonymous quote from one former MP, who said: "It was like a bereavement, and it was, but there was no funeral."

In the same study, Baroness Jowell, who stood down at the 2015 election after 23 years as the MP for Dulwich and West Norwood, explained why it can be such a terrible shock to the system.

"As an elected politician, you are always switched on and feel the responsibility for your electorate day and night. This is not easy to give up."

For some former ministers, the pain can be mitigated by trading in a high political profile for a high profile elsewhere.

Former Chancellor George Osborne is now editor of the London Evening Standard, former shadow chancellor Ed Balls used a comedy turn on Strictly Come Dancing to raise his profile and transform the way he was viewed by the public.

Michael Portillo emerged from a defeat in the 1997 election so famous that it became known as the "Were you up for Portillo?" moment, but reinvented himself as a cultured presenter of railway travelogue documentaries.

Some people even revel in the their new-found freedom. Liberal Democrat Norman Baker, a minister in the 2010 coalition government, reformed his old band the - er - Reform Club, released new material and went on the road.

Media playback is unsupported on your device Media caption Norman Baker performs at London's Piccadilly Circus

A scathing review of a single in the Daily Telegraph - "banal, obvious and utterly pedestrian" - hasn't stopped him embracing a varied media life to the point where he told the Independent newspaper he had no intention of returning to front-line party politics.

Others, like Labour's Chris Williamson, who lost his seat in Derby in 2015 by 41 votes, immediately work to get back to Westminster as soon as possible.

"I'm a Derby lad," he told the New Statesman, "You're elected to represent your city, and then you lose - I was in the depths of despair."

He duly won his seat back on Friday morning, with a majority of 2,015.

Others, however, choose a different path.

Jackie Ballard lost her seat at the 2001 general election after four years as the Lib Dem MP for Taunton, agonisingly falling short by just 235 votes.

"I was very disappointed as I knew I had been a good, hard-working MP and had a great team of helpers, who I felt I had let down," she said.

Image caption Jackie Ballard during her time as Lib Dem home affairs spokeswoman

"I decided as soon as I knew the result (although it was about 05:00 in the morning, after a number of recounts) that I would not stand again. I felt rejected by the people in Taunton, where I had lived for many years, and didn't want to live there any longer."

It was a painful change of fortune for a woman who had stood for the leadership of her party just two years earlier.

For a year she went away to lick her wounds on a "gap year", living and studying in Iran.

But when she got back she found that her Westminster experience - even the tough times - held her in good stead when looking for an alternative career.

As an MP some thought her outspoken opposition to blood sports, including co-sponsorship of the first bill to attempt to introduce a ban on fox hunting, had sealed her electoral fate.

But her campaigning track record helped her to secure a plum job as director general of the RSPCA.

Image copyright PA Image caption Nick Clegg lost the Sheffield seat he had held since 2005

Ms Ballard went on to hold senior roles with the RNID, and Womankind Worldwide, a relatively small but respected international women's rights charity, before becoming chief executive of Alcohol Concern in 2014. She was also appointed to the Independent Standards Authority, overseeing MPs' expenses in 2009.

"I have loved working in the charity sector and feel that I have made a lasting contribution to a number of very worthwhile charities," she said.

"It was challenging to move into leadership and management, but I loved doing something worthwhile and where my Parliamentary experience was useful on the campaigning side.

"A key skill which is needed to get things done in Parliament and in charities is the ability to make alliances and work with others to achieve an outcome."

Gemma Doyle, one of the raft of Labour MPs in Scotland who lost their seat to the SNP in 2015, says she adjusted quickly to the new reality of life after Westminster.

Image copyright Reuters Image caption Couldn't stay away: Chris Williamson has made a speedy return to Westminster after losing his seat in 2015

"I spent about two days feeling sorry for myself, but fairly quickly moved on to accepting that there was nothing I could have done about the result, that it was the consequence of a principled stance we had taken on the Scottish referendum, and there was no point in dwelling on it," she said.

"The 2015 election result was quite unusual, I had lost in a constituency which, under normal circumstances, would have been a guaranteed safe seat. The swing against me, and my Scottish colleagues was massive.

"However, strange as it sounds, there is comfort in losing in such a spectacular way. If you lose by just a little, it must be difficult not to dwell on the things you could or should have done differently. If you lose the way most of us did in Scotland, there's just nothing that would have changed the result."

Ms Doyle is now a director at a public affairs firm, and also freelances in the sector.

"There is a myth that ex-MPs are given or helped to find new jobs. That's not true, you are on your own, and there's no doubt that but for a few exceptions, it's tough to work out what comes next, especially when you have just lost, what for me was my dream job.

"I worried I wouldn't end up doing something that felt like it mattered again, but I fell into freelancing, including consultancy in some strange bits of the world working to support emerging democracies, which I enjoy enormously.

"I feel hugely privileged to have been an MP. In the end if you stand for election you have to be prepared for defeat. That's politics."