A decade ago I was renting a tiny room in a small flat in north London. I had moved to the capital to study for a Master’s degree and I was living with strangers, while working two part-time jobs to bring in some money.

For one of my jobs, I worked in a pub down the road. The work was fine – waitressing and pulling pints – but the hours were long. The manager would frequently harass the female staff with inappropriate comments and groping, but there was nobody to complain to. Over time, I became increasingly anxious and reduced my hours, finding extra work in a nearby independent bookshop.

A couple of days a week, I would categorise old books and add them to an online system, as well as minding the shop when the owner – a kind if eccentric man – was out. The shop was a mess. In each room, piles of books rose from floor to ceiling, which made moving around a challenge. Layers of years-old dust coated everything. In so many ways, it was perfect.

The hours passed quickly and quietly, and the stress of my studies and my other job began to dissipate. From time to time, the owner would dig out books relevant to my literature course and give them to me to read at lunchtime in the shop’s back garden, with the neighbour’s cat beside me. When I felt anxious, I would delve into fiction books and disappear into different worlds, far from my own.

Working in the bookshop made a huge, positive difference to my mental health at a time when I felt overwhelmed. Between doing busy shifts at the pub and my studies, I was able to spend a few quiet hours a week reading, organising books and interacting with browsing customers, after which I felt calmer and far more able to cope with other stresses. For me, it made a world of difference – but these opportunities are under threat.

Booksellers in the UK and the US have reported an upturn in sales and visitors this year, but not all independent bookshops are surviving the rise of Amazon. Last year, several iconic independent bookshops in the UK closed, including Shropshire’s Wenlock Books and Camden Lock Books in north London. In December, Holt Books – once named one of Britain’s top 50 bookshops – announced it would not be renewing its licence this year, blaming escalating rental costs and competition from internet shopping.

The decline of the high street is nothing new, but in the face of a growing mental health crisis, recognising the positive impact that reading can have on mental health – and therefore bookshops and libraries – is crucial.

So why is a good read good for us at a much deeper level?

There’s something very special about being in a bookshop. Unlike other shops, they and libraries are calmer spaces where anyone can lose themselves in a story. And while you can browse millions of books online, there’s something irreplaceable about going into a shop and asking a book lover to guide us on the journey.

It may be less convenient, but it’s much more mindful and restorative to search through a bookshop to find what you’re looking for – or locate an unexpected gem. As author and mental health advocate Matt Haig wrote on twitter: “Aren’t bookshops wonderfully strange, sitting there with quiet menace, as if they were just a shop and not an entry point to 30,000 different universes?”

In fact there’s a wealth of evidence to support the idea that books can help to boost good mental health. ‘Bibliotherapy,’ a term first coined by American essayist Samuel Crothers in a 1916 issue of Atlantic Monthly, means the art of using literature and reading as a healing activity. It’s widely accepted as a way to enhance wellbeing.

In 2013, a study published in the journal Clinical Psychology & Psychotherapy examined the impact of reading on 96 patients with mild depression. Those given a book to read saw an improvement in their symptoms. Another study by the University of Sussex found that reading can reduce stress by up to 68% – and is far more effective than other relaxing activities including listening to music or going for a walk (though don’t let that put you off…).

Another study from The New School for Social Research in New York found that reading fiction improves something called ‘Theory of Mind’ – essentially, our ability to empathise with others and understand that other people hold different beliefs and desires to our own. Given the challenges we face and the depth of polarisation in society over politics, opening our minds to other thoughts, views and cultures is important. This has a direct and positive impact on our collective mental health too.

Katerina Georgiou, a counsellor and psychotherapist, says there are many reasons why books can help improve your wellbeing, but one of the most important may be due to being “fully immersed in the here and now.”

“Fiction in particular focuses you on an altogether different narrative to the one you may habitually have in your day to day life,” she told me in recent interview. “A fictional story typically follows a clear story arc of triumph over adversity, the overcoming of obstacles and an end resolution where balance is restored. This can tap into universal truths which give a reader a sense of meaning, connectedness, familiarity and hope.”

Characters can also become role models or offer greater insight and empathy, putting us in touch with complex feelings that are sometimes difficult to articulate alone. “Seeing one’s own complexities given voice on a page can be a healing experience in the recognition that something seemingly so personal to you is shared,” Georgiou explains.

We often read literature for the feelings we hope to get from it – which might mean an experience of aliveness, love or fear followed by relief. “In this way we can feel feelings we might not often otherwise experience, depending on the way life currently is,” says John-Paul Davis, spokesperson for the UK Council for Psychotherapists. “For someone with depression or anxiety, for example, the feeling of love may not be as much a part of life as they’d like, but they can feel it at the turn of a page in a book.”

For so many of us, loneliness and isolation are byproducts of mental health issues, but reading can help. “When we’re in emotional distress, we can also feel that others somehow seem to be better at life than us and that we’re alone in our experience,” Davis adds.

“Through reading, we see that all humans, throughout time, have had similar needs and wants and struggle in similar ways to meet them. This shared experience helps us feel much more part of this wider interconnected body of humanity, which is great for our mental health and wellbeing.”

Bookshops and libraries also give us access to a world of human knowledge and experience, showing us new ways of thinking, feeling and behaving. Non-fiction books exist on all subjects from resume writing to gardening and mindfulness, expanding a while range of opportunities for people to educate themselves and improve their understanding of the world – and their capacities to act in it effectively.

Amazon and other online retailers will continue to slash book prices in the hope that consumers will prize cost and convenience over everything else. But slashing prices will never replace the joy of finding a second-hand novel filled with annotations from its previous owner, who needed the book just as much as you.