Theresa May stood awkwardly in the middle of the room while EU leaders chattered and embraced, apparently oblivious to her presence.

Amid the roar of voices, the EU foreign policy chief, Federica Mogherini, greeted the prime minister of Luxembourg, Xavier Bettel, with air kisses and a friendly pat on the back. Standing alone, the British prime minister fiddled with her cuffs.

May, of course, was not ignored by leaders as they arrived in Brussels for a summit on Thursday. Although May walked in alone, another clip showed her smiling and talking to other people in the room.

But the snapshot happens to be a telling image of what the leaders of the other 27 member states want to convey. That, while Britain heads for the EU exit door uncertain of what it is doing, the EU’s remaining 27 stand strong and together – united, as the EU motto goes, in diversity.

Theresa May with Angela Merkel and Martin Schulz, the European parliament president. Photograph: Licoppe/Belg/Rex/Shutterstock

Even seasoned Brussels diplomats have been surprised by how well EU unity has held together since Britain’s vote to leave. Over a silver service dinner this evening, EU leaders will once again seek to assert that unity, when they repeat their well-worn lines that the UK cannot cherrypick the best bits of the EU.

But in truth the EU 27 have little room for complacency. Brexit may be the one thing that truly unites them. During the rest of the summit, painful divisions were on display as leaders confronted the other existential problems facing the bloc, from migration and dealing with Russia to the eurozone.

Countries are deadlocked over how to share the cost of record numbers of migrants and refugees arriving on Europe’s shores. Germany, Italy, Greece – the countries coping with the largest number of arrivals – are pressing for the rest of the EU to do more. But the idea of fining countries for not taking in refugees has stalled, following bitter opposition from Hungary and Poland. Meanwhile, fewer than one in 20 refugees have been found homes under an EU relocation plan.

Fissures remain deep, too, over Russia. The EU will almost certainly on Thursday rubber-stamp a decision to continue economic sanctions on Moscow for its actions in Ukraine. But this was a foregone conclusion and the bloc is split over how to deal with its large eastern neighbour. Germany and France, backed by a Brexit-distracted UK, have pressed for sanctions on Russia in protest over its bombing campaign in Syria. But Italy remains firmly opposed, a stance unchanged under its new prime minister, Paolo Gentiloni.

EU diplomats have been forced to watch powerlessly as the humanitarian catastrophe in Aleppo has unfolded. The French president, François Hollande, arrived at the summit insisting that Europe must make its voice heard. But, while the EU is drawing up reconstruction plans and has agreed terse resolutions and despairing statements, it has not had any influence on the ground. EU leaders are likely to declare they are “considering all options”, almost word-for-word the conclusion reached in October.

During weeks of immense suffering in Aleppo, the EU has been debating abstruse plans to develop defence capability, a discussion that continues at Thursday’s summit. Eurosceptics like to say Brussels is building an EU army, but the reality is closer to a paper tiger. The EU can draw on rapid-reaction forces of 1,500 soldiers to stabilise crises but has never done so. It has mechanisms to allow EU armies to work together, but these have never been tried.

EU negotiators outrank UK ministers in Brexit 'power list'

Read more

Meanwhile, the eurozone crisis is lapping at the door. On Wednesday, officials froze short-term debt relief measures for Greece, after the prime minister, Alexis Tsipras, decided to give a Christmas bonus to pensioners, in defiance of Greece’s bailout terms.

Brussels insiders say there never was a golden age of unity, even when only 12 or 15 members were in the club. But the stakes, they point out, have changed.

“A lot of people say it used to be easier in the old days,” one senior diplomat told the Guardian recently. “I was there in the old days; it just isn’t true. In the 80s we would have had vetoes because of the price of milk. Now we are way beyond that; we have vetoes because of migration. The process of integration has deepened so far we are now at very fundamental issues. And it is perfectly legitimate for those discussions to be long and difficult.”

Little wonder, then, that the EU 27 will be keen to maintain their united front on Brexit when, on Thursday night, they sit down for a dinner to discuss it without the presence of the UK prime minister. But, as the bloc flounders on other vital themes, it is less and less obvious that the EU’s machinery for building compromise is working. Once negotiations get real, even the unity on Brexit could begin to fray.