In human lives, a traumatic experience lasts for years. In politics, it seems a trauma can be overcome in only a few short weeks. The Liberal Democrats will have a new leader in less than a month, while Labour is well into selecting a new chief by September. These processes are trauma denial. By putting the leadership carts before the inquest horses, both parties will fail to draw the strategic conclusions that a longer period of reflection on their general election defeats might make more possible.

This week’s Guardian reconstruction by Patrick Wintour and Nick Watt of the anguish inside the Lib Dems in the months leading up to the May catastrophe is genuinely revelatory. In many ways it is even more revelatory than Wintour’s earlier attempt to get inside the backroom stresses of the Labour campaign. In Labour’s case, the party’s internal anguish about Ed Miliband and his ineffectual leadership was hardly a secret before the election. But the Lib Dem psychodrama has been much more effectively concealed from the public gaze – until now.

Neither party, though, can afford to be in denial about what happened in the years leading up to the losses of 7 May. I’ll return to Labour in a moment. But the Lib Dems have been in long–term denial about whether coalition under Clegg was too high a price for the party to pay. Wintour and Watt blow some of that apart. Nevertheless, the most attractively open party in British politics is in some ways also the most unattractively closed.

Right from the start of the coalition, it was clear that support for the Lib Dems was bleeding away. Year after year, the evidence of opinion polls and, even more damagingly, of real elections was relentlessly devastating. Over the period of the coalition government, first the Lib Dem local government base was destroyed; then the Lib Dem European parliament base; and finally the hard-won Lib Dem base at Westminster.

Yet not one of the Lib Dems can stand up and say they weren’t warned, or that they could not have addressed the problem if they had chosen to. The May 2015 wipe-out was clearly predictable for years. The signs were consistent and unequivocal. A few voices tried to warn of the coming crash and make the case for averting it. Yet the party consciously chose not to listen.

Not only that. The party also persuaded itself – and persuaded some of the commentariat – that the polls were wrong and that at least half of the 57 seats won in 2010 could be retained against the odds in 2015. It did this largely on a wishfully optimistic reading of the result of a single byelection – Eastleigh in early 2013 – on which was constructed a defend-the-citadels strategy wholly at odds with the national opinion polls and the lessons of the 2014 EU election debacle.

Both the Lib Dems and Labour are flirting with classic denial mechanisms of the politically traumatised

The Lib Dems are therefore a party in need of a double inquest: one into the lessons of the 2015 election disaster, and another into the party’s refusal to act to avert it. Nick Clegg said yesterday that the resignation he rightly thought about making in 2014 would not have changed the outcome in 2015. That’s a tricky call, because the Lib Dems would have been attacked for switching leaders, but I’m not so sure Clegg is right. His decision not to resign guaranteed the scale of the carnage on 7 May, so a risk was surely worth taking.

Both the Lib Dems and Labour are flirting with classic denial mechanisms of the politically traumatised. This is a phenomenon with a long history. Back in the 1660s, after the restoration of Charles II following the Cromwellian republic, the experience of defeat led many puritans to see themselves as true believers who had been exiled into the wilderness as defenders of the everlasting gospel. The danger for both the Lib Dems and Labour is that they make the same mistake.

In both cases the lure of the old-time religion is a great solace to the defeated. In the Lib Dem case this points to the victory of Tim Farron in the upcoming contest. Farron embodies everything that is oppositional in the Lib Dems. He will focus on issues such as localism, the environment and civil liberties, which represent the party’s comfort zone. He will make the party feel good about itself. But he won’t get it back into government.

A similar role is now being played in the Labour leadership contest by the left’s candidate, Jeremy Corbyn. Like Farron in the Lib Dems, Corbyn offers a programme of prelapsarian socialist purity, in his case centred on inequality, the immorality of capitalism, and comradeship with the downtrodden of the world. The Fifth Monarchy men of the 1650s and 1660s would have recognised the appeal of the everlasting gospel to believers in the wilderness. And Corbyn has real support. It would be a surprise if he comes bottom of the poll. Good judges think Corbyn may make it down to the final two.

The difference, though, is that Labour is still potentially a party of government. At which point it is confession time. Back in 1979 I wrote the only letter I have ever written urging a politician to stand for his party’s leadership. I wrote it to Tony Benn and, characteristically, he wrote back to thank me, all very flattering. Those were the start of the wilderness years, and at that time the everlasting gospel being preached by Benn seemed to me like the answer for the Labour party.

But I was wrong. Badly wrong. Naively wrong. Making the party feel good about itself as a voice in the wilderness was not the answer. It was a disaster. It was a march to the oppositional margins and a turn away from the possibility of government. The nadir was the 1983 election, when Labour under Michael Foot very nearly fell into third place.

The Lib Dems can perhaps afford a period in the wilderness, challenging the Greens for the left-liberal protest vote. Not so Labour. And the lessons of 1983 and 2015 have to be learned if the party is serious about winning a majority. This task is now electorally so demanding for Labour – which needs a 12.5% swing to win the 94 new seats required for a majority in 2020 – that many activists will prefer not to make the hard choices it demands.

But it is the question that underlies the current contest. It has to be faced and answered without any naivety whatever. Party of opposition or party of government? Purity or power? You have to face one way or the other.