In Italy they are singing and sharing recipes. In France, humour is saving the day. In Spain, communal staircases have become the new running tracks, and in Germany, ordinarily disorderly hackers are busy coding corona-busting apps.

As hundreds of millions of Europeans languish in lockdown, people are finding increasingly inventive ways to keep themselves entertained – and to counter what the continent’s psychologists warning are the very real risks of confinement.

Like everyone else, Italy’s 60 million citizens, who went into lockdown on 9 March, have been “asked to make sacrifices”, said Sara Raginelli, a psychologist in Ancona. “And as we live in a rather dramatic way, our mental health is being challenged.”

In a survey during the first week of Italy’s confinement, 93% of respondents said they felt at least a little anxious, while 42% described a distinct drop in their mood and 28% reported that they were not sleeping well.

Italians are entitled to a free online consultation from the health ministry, which has warned of a “psychological emergency”, saying people risk being “overwhelmed by fear of a insidious virus that has banned us from hugging and being close to others”.

Play Video 2:10 From bingo to ballet: communities connect during coronavirus lockdown - video report

Some 9,000 psychologists are involved in the #psicologionline scheme, offering phone or video consultations aimed also at countering the “heartbreaking effects of the daily death toll, warlike scenes, and easy risk of infection if we don’t stay home”.

Some degree of anxiety, of course, is only normal. Borwin Bandelow, from Göttingen in Germany, said humans developed into social creatures to survive, so isolation was an unnatural state for most. “In the past we lived in tribes, and those who broke away from those tribes had very little chance,” he told Der Spiegel.

It’s about knowing this isn’t an individual and isolated suffering, but a collective suffering. Aurélia Schneider, psychologist

That meant isolation “can cause some to develop pathological angst conditions,” he said. But overall, the long-term negative effects of physical isolation should be considerably lessened by the knowledge that everyone is experiencing them, said Bandelow, who has made a special study of fear.

“As soon as an exceptional situation affects many people, the effect is less strong … During the war in Yugoslavia, patients who habitually suffered panic attacks were no more scared than the next person. In fact, the number of panic attacks decreased, because they were suddenly faced with other, very concrete things they had to fear. They needed to protect themselves, and so needed to have control over their bodies.”

Germans who suffer from angst or panic at an avalanche of coronavirus news can turn to a fear-free news service, angstfrei.news, which twice a day publishes a short news overview so that they can stay informed without being overwhelmed by horror stories.

French psychologists echo the importance of realising that the pain is shared. While everyone will respond differently, we all “have to be able to make sense of the situation”, said Aurélia Schneider. “This will give us psychological protection. It’s about knowing this isn’t an individual and isolated suffering, but a collective suffering.”

In Spain, however, clinical psychologist Albert Soler warned against the dangers of trying to stay falsely upbeat. “When things are bad, being pressured to be positive can be positively harmful,” he said. “The positivism of Instagram is dangerous at the best of times – but now it’s even worse.”

In terms of practical advice, Europe’s psychologists mainly stress the importance of staying in touch and keeping busy, if necessary with the help of daily to-do lists. In Italy, Raginelli’s advice was to “maintain contact with others” by every means possible and as much as possible.

Play Video 2:15 Rooftop aerobics, singing and letters: how communities are coping in coronavirus quarantine – video

Rosella De Leonibus, a psychologist in Perugia, said that keeping active was vitally important. What counted, she said, was “everything that’s an action – with a result. Passive is no use; passivity makes you feel anxious and increases anxiety.”

Erik Scherder, a professor of neuropsychology at VU university in Amsterdam, said the crisis presented a challenge and an opportunity: to exercise. “The biggest gains are for those who are very sedentary,” he told De Standaard. “Which is most of us.”

Belgians, who went into confinement on 17 March, are getting regular down-to-earth suggestions on how to live their best locked-down lives by the spokesman at the national crisis centre, Benoît Ramacker, who advises basic everyday activities such as cooking, reading, gardening and DIY.

“The psycho-social dimension is very important in this crisis,” Ramacker said at one briefing, urging people not to spend the whole day on social media and to establish a routine that gives structure to their days. “You can do a lot at home.”

But there are bound to be tensions. When the inevitable rows do break out, Jean-Luc Aubert from Nantes suggests self-isolating for a while in the bathroom. “Everyone is a little anxious, so it doesn’t take much for everyone to get upset, angry, worse,” he said. “We have to acknowledge this, to be very careful and on our guard.”

Whether they have listened to the psychologists or not, millions across the continent have developed coping strategies. Gregarious by nature and used to living life outdoors, Spaniards – most of whom, like many Europeans, live in apartments – are finding solitude, silence and confinement particularly hard.

Rooftop terraces have become a popular location for workouts, although not everyone has access. Many have taken to running up and down the communal staircase. One father reported that his daughter was keeping up volleyball practice at home, using a toilet roll as a ball so as to avoid breakages.

Many, too, have been faced with the delicate challenge of educating elderly relatives they would habitually visit at least once a week in the use of mobile technology. “I’ve taught my 82-year-old mother how to make video calls,” said Reme, one Barcelona resident. “Now there’s no stopping her.”

Italians, also suffering from having to lead an indoor life, cheered the world in the early stages of their confinement by singing or playing musical instruments from their balconies each night in a show of solidarity, although reports suggest that has tapered off over the past week.

Many have now taken to doing online yoga or are sharing their fitness regimes. Others have been writing, painting, and cooking more – and sharing their recipes online. Many are joining top chef Massimo Bottura for his live Instagram show.

“It’s not a masterclass, it’s kitchen quarantine with our family,” Bottura said. “We just want to have fun and show to the world that with a few things – a table, a few ingredients, a family – we can have fun.”

Simona Fabrizio, another international chef and the owner of Sagraincasa in Orvieto, Umbria, asks her followers to pick one ingredient – eggs, tuna, chicken – and create a recipe with an additional four ingredients, then share their pictures.

In Germany, 42,000 programmers and software designers gathered online for a mass hackathon. #Wirvsvirus (we against the virus) came up with possible solutions to problems including virus tracking, improving inter-hospital communication, distributing food to the homeless, and helping farmers find people to bring in the harvest, and ended with a mass party on YouTube and Slack. A jury will decide which projects will be supported, with government funding guaranteed for the best.

Like many across Europe, Brussels residents have taken to applauding healthcare workers at at their windows and balconies at 8pm every evening. Belgium’s King Philippe flies a white flag from the Royal Palace in tribute.

In France, confined since 17 March and allowed out – on pain of a heavy fine – only to shop for essentials, exercise or walk the dog, humour has – for the time being – become a mainstay of social media conversation. Comedians post a new video every day.

Photoshopped images of exhausted dogs (“Everyone in the apartment block has walked me today; when will it end?”) abound. President Emmanuel Macron, his face digitally aged by a decade, informs the nation: “Compatriots, you may now go out.” A spoof tourist guidebook promises “the indispensable guide to the finest undiscovered corners of your place of residence”.

Videos of neighbours cycling round the balcony and flatmates playing foot-ping have gone viral while on Twitter individuals share their tales of lockdown woe: “My mother: ‘You don’t get fed up spending the whole day on your computer?’ Me: ‘I run a web marketing department.’ Mother: ‘So?’” tweeted one.

Another lamented that after only four days of confinement, his mother could take no more: “She told me to go out – and she’d pay the fine.”

Reporting by Angela Giuffrida, Kate Connolly, Kim Willsher, Jennifer Rankin and Stephen Burgen.