None of the careful arguments to persuade the Scots to vote yes or no to independence next year will ultimately prove as important as raw emotion. Nationhood is an imagined space within which people feel comfortable taking and accepting decisions, even when they go against you. Margaret Thatcher's poll tax experiment crystallised Scottish unease. Why should a progressive nation be yoked to English conservatism, always condemned to travel at the pace of the slowest in the convoy, or even in the wrong direction?

This issue of identity will ultimately determine the result of the referendum. Do the Scots still feel comfortable taking decisions with the English, Welsh and Northern Irish? Or will they go it alone? All the evidence about Scotland's sense of identity suggests that the rest of the UK could be in for a shock, whatever the polls now say. My guess is the result will be close.

The unionists may look as if they are winning comfortably until the last few weeks, and then the heart will take over. Of course it is possible to be multi-layered Scottish, British and European, but most Scots identify first and foremost with Scotland. The proportion describing themselves as mostly British has fallen to fewer than one in 10. As in Quebec in 1995, feelings will shift votes.

Economic arguments are never likely to be conclusive and, in any case, Alex Salmond is one of Britain's best energy economists when he is not moonlighting as Scotland's first minister. I doubt he will lose the economic argument.

Scotland has a similar population to Denmark, one of the best-run EU countries. There are great advantages in being able to gather the key decision-makers in one room. It is easier to communicate and agree on a vision, easier to make decisions and change.

Against that, small countries are inevitably less diversified. Finland relies on forestry. Norway on oil and gas. Sometimes the industries on which they rely can be hard hit, and that means pain. Look at Ireland or Iceland after the banking crash. But no economist can adduce evidence that will settle decisively the small versus big argument, so the Scots will fall back on feelings. And feelings are precisely where the unionists are weakest.

Remember the sources of British identity. Britain is a historically new construct, an accidental creation of Tudor infertility. The Scotland and England of a common throne were bound together in the Act of Union of 1707 because of fear on both sides that the Protestant ascendancy would be imperiled. British nationhood is just 300 years old, a blink in human history.

Linda Colley's book Britons persuasively argues that the forging of Britishness during the 18th and 19th centuries was based on three elements. The first was a common Protestantism, whether in the established or dissenting churches. The second was the continued threat of a Catholic power, France, which had demonstrated its own intolerance for Protestantism in the flood of Huguenot refugees who enriched this country. Between the glorious revolution in 1688 and the battle of Waterloo in 1815 – the founding period of the British state – we were at war with France for 57 years. Look at Hogarth or Gillray to see what the 18th-century Briton thought of the French. France had doubled our population and was a fearsome threat to our trade, freedom and worship. There is nothing like war to unite a country.

The third factor in Britishness was empire. For the younger sons of impoverished Scottish gentry, the empire was booty. The conquest of Bengal alone funded countless country estates back in Britain. Imperialism meant jobs for the boys – particularly poorer Scottish boys.

All these sources of British identity are now extinct. The Catholic church has its own problems, but it shares its principal one with Protestants: Britain is irreligious, if not yet atheist. France may be a threat in the fevered imaginings of Ukip, but even Nigel Farage would have to concede the prospect of a French invasion looks remote. The main vestiges of empire are the ludicrous monikers in our honours system.

The older identities are stirring across Europe, not just in Scotland. Catalonia wants more power. The Basque country asserts its own independence, even collecting its own taxes. Once the need for large states to defend common polities has vanished – a tribute to the EU's peacemaking abilities – why not go with your feelings?

Salmond understands the role of emotion and identity. I remember visiting him in Edinburgh and being seated in front of a huge painting of a virile Scotsman holding aloft a fluttering saltire. It was pure Atatürk. Salmond, a formidable politician, is determined to be the father of his people.

Danny Boyle did his best to nourish post-imperial British pride with his Olympic tableau, but it is going to need more than dancing NHS nurses to persuade the Scots. If the unionists cannot articulate a new sense of British values and purpose, with which all the people of these islands can identify, the Scots may well vote for their auld country back again. It may be small. But it will be Scottish, and probably rather civilised and successful.