The EU will be hurt financially by the UK leaving, yes, but there is more to life than GDP and GDP per capita.
People in Europe
are spending money. They are doing perfectly fine. Their growth isn't exactly fantastic, but we are living in a world where low growth is the norm (unless you are a developing nation or inflating your figures like China). There are some structural problems in the EU, yes, such as youth unemployment and Italian banks, but then again, there's structural problems everywhere in the world, including the UK (housing prices, awful productivity, London bias, etc.).
Countries like Germany and France know that there are benefits to the EU that are worth fighting for, at the expense of a little trade. In fact, it's the exact same argument made by Leave - it is worth a little economic pain to Take Back Control (TM). If they give the UK a preferential deal, they risk the cohesiveness of the EU and this may weaken the Single Market, which increases internal trade barriers, and causes losses.
The problem arises because although we have a trade deficit, the EU is significantly larger than the UK, so what may be a flesh wound to the EU may be an amputated limb to the UK. The EU's GDP is about $17t, while the UK's is about $2.8t.
Two of the largest trade bodies in Germany
backed Merkel's firm stance on Brexit. This suggests that German companies are willing to accept the loss themselves. This suggests that they consider reduced trade with the UK to be the lesser evil compared with weakening the EU.
I think a lot of this is to do with the fact that believe it or not, people on the continent don't want to leave the EU. Yes, a lot of people dislike it, but that doesn't mean they want to leave. Europe suffered a lot more last century than the UK - Germany was broken in World War II, Germany and France have been rivals for centuries (maybe even over a thousand years if you want to consider the Carolingan realm collapsing), Spain was recovering from Franco (and probably still is), Eastern Europe has gained tremendously thanks to the EU... The UK's dislike of the EU is absolutely not replicated on the continent, except perhaps in parts of the Nordic nations. While "one country" is probably centuries off, there is a reason why there's basically radio silence from Europe except polite requests to trigger Article 50 - on Brexit, the EU is pretty unified on what they want.
Logistics matter. Shipping over longer distances costs money, which will add to costs. Shipping over long distance is also bad for the environment. Increasing the focus to multiple countries means complying with multiple - possibly conflicting - standards, regulation and tariffs, meaning companies must create multiple manufacturing lines and all the red tape that goes with it (like inspections and paperwork). Shipping over long distances also takes longer, which means that more-perishable goods cannot be shipped and the time delay between "shipped" and "received" complicates accounting. Shipping over longer distances has a security component too - sea travel has piracy and rough seas, but the Channel is calm and jointly-monitored. Air travel places additional restrictions on freight.
One thing that is easier to do globally is services, but here, the barrier is regulatory differences, not tariffs. In other words, it is best if two countries have the same regulatory standards to maximise the services economy. But that would mean a loss of sovereignty because it means putting some of the UK's laws under another country's influence, if not control.
Services are the future of the world, especially in the UK as a developed economy. We should be working to normalise regulations across the world to maximise our economy, but there is no way we can do that alone - we need to be part of a stronger bloc with a bigger hammer. The EU is deadlocked with the US on a deal that barely scratches the surface in this area. The UK wouldn't stand a chance alone.