It would be consistent with a certain kind of Britishness for the nation to ruin itself through sheer embarrassment. Having gone to the trouble of voting to leave the EU, a change of heart would just be too awkward: like complaining about a haircut while still in the chair. So we watch the mirror in mounting anxiety, fretting that this was never what we had asked for, forcing a smile nonetheless, knowing we’ll still pay at the end.

There is a swelling body of evidence that Brexit is shaking confidence in the country’s international credibility, and cannot be completed in the allotted time without economic vandalism. There is also the referendum result, before which evidence is made to cower. The decision has been taken. Article 50 is activated. We can’t get cold feet now. We’ve booked the caterers.

Embarrassment is underrated as an engine of history, maybe because it is embarrassing to admit it as an individual motive. But try this experiment: seek out your worst memory, the one you would gladly expunge from your mental record. The chances are, it contains a humiliation or cringe-inducing act of stupidity. Pain, the more dreaded sensation, is easier to bear over time. We adapt to loss. Wounds heal. Grief goes numb. But shame has a lingering burn.

The roots of Euroscepticism go deep – through the sediment of two world wars, beyond Waterloo and the Spanish Armada

Humiliation corrodes the soul of nations. This thought occurred to me during Dunkirk , Christopher Nolan’s cinematic re-enactment of the 1940 evacuation of British soldiers from fallen France. It was a disorderly retreat following a defeat: “a colossal military disaster”, said Churchill. Yet Dunkirk spirit became an emblem of national character – a metaphor for plucky survival against insuperable odds, and a benchmark for resilience.

It helps that allied soldiers were back on French beaches four years later, rolling back the Nazi tide. The story has a happy ending, which gives safe poignancy to the opening chapter, in which the goodies were losing.

Victory over fascism, after a period of solitary defiance on an island fortress, has infused British identity with vast reserves of moral authority, projected through a lens of defensive insularity. But the rest of the world has not sustained its gratitude for as long as we have continued to congratulate ourselves. And the investment of so much collective pride in one segment of history has consequences for subsequent generations. Canonising a finest hour from the 1940s makes all the ensuing hours feel a bit drab.

We have made an overbearing parent of our history, one which belittles our efforts and in whose shadow we feel unable to shine. And it was at a moment of underachievement that Britain joined the European Economic Community in 1973. The empire was lost. West German industry had been rebuilt to a higher spec than its British rivals. Ungrateful France did not repay its liberators with humility. De Gaulle had vetoed British entry a decade earlier. The doors to the club were opened not on demand but after supplication. The seeds of Brexit were thus sown with the foundations of EU membership. It was, at some level, embarrassing to be joining through dread of decline.

Britain is too rich in cultural contradictions to conform neatly to any cod psychoanalytic diagnosis. And it is hardly an original observation that Britain struggled to get over the loss of its colonies and is riddled with ancient ambivalence towards the continent. The roots of modern Euroscepticism go deep – probably as far as adventurous historians want to excavate, through the sediment of 20th-century world wars, beyond the crust of Waterloo and the Spanish Armada, into the roiling magma where nationhood is forged.

All of Europe’s tribes have their myths of unique cultural genesis. All narrate the past in the first person plural, casting neighbouring countries as supporting characters to their leading roles through history. Yet none can match Britain’s anxiety about the dissolution of identity through EU membership. That is, I suspect, partly an accident of our demoralised entry. An alliance that has served our interests well enough for 44 years is tangled up with subconscious feelings of shame.

And in psychoanalytic terms, shame is a kind of violent impulse directed inwards. Brexit, in this conception, is not a rational expression of cost-benefit equations based on considerations of trade. It is self-harm, born of a neurotic urge to expiate an imaginary guilt: the sin of having been obliged to join the enterprise in the first place.

I fear we are about to rehearse the cycle of shame and resentment all over again. There are two routes ahead, neither free of humiliation. The enactment of Brexit will complete an economic, diplomatic and strategic devaluation that is prefigured already in sterling’s post-referendum slide. Britain will be measurably smaller on the world stage. The reversal of Brexit, or its dilution into some pale simulation of the status quo, requires a plea in Brussels for more time and a fresh start. That will be hard to distinguish from a grovel.

Either way, there is disappointment in store for many leave voters who anticipate a national renaissance. If they don’t get Brexit, their democratic will is denied; if they do, and it makes them poorer, their faith is betrayed. Each path risks incubating more bitterness.

The case for pressing on, in deference to the verdict of the ballot box, has undeniable political and emotional urgency. And once that course is set, a kind of dogged British stoicism sets in even among many Brexit-sceptics. It is not quite optimism, but a determination not to be defeatist. Surely there is some muddle-through solution, some Dunkirk-spirited, make-do-and-mend compromise that gets us all to the other side of Brexit with national dignity still afloat. I certainly hope so. But it is a risky business, seeking comfort in history’s miraculous escapes. They are, by definition, exceptional.

Also, we are not at war. In the national story Britain tells about itself, Dunkirk is a preamble to heroic isolation followed by magnificent military redemption. It is a powerful tale but a rare one. It masks a more banal lesson from the evacuation: retreat is no one’s favourite manoeuvre, but sometimes it is the best one available. Sometimes, when a plan goes wrong and disaster is visible on the horizon, it is time to swallow pride, and turn around.

Rafael Behr is a political columnist for the Guardian. He has been political editor of the New Statesman, chief leader writer on the Observer and a foreign correspondent for the Financial Times in Russia and eastern Europe.

© Guardian News and Media 2017