Kerry Irving was outgoing and adventure-loving until his car was hit by a truck in 2006, causing him severe spinal injuries.

It transformed him into a pain-wracked, housebound shadow of himself.

He went from cycling over 600 miles a month in the Lake District to struggling with severe depression, panic attacks and even thoughts of suicide.

On his rare trips outside his house, Kerry would see Max, who belonged to a neighbour.

He asked if he could take him for a walk and as their friendship developed, Kerry ventured further and further.

He said: “Max gave me a reason to get up in the morning and something else to focus on, other than the pain.”

When Max’s owner mentioned that they wanted to re-home him four years ago, Kerry didn’t hesitate.

Since then, the pair - or more especially Max - have become worldwide celebrities with more than 100,000 followers of Max’s Facebook page: Max Out in the Lake District and another 29,000 on Instagram, all following their days out and adventures in the Lakes.

Their regular charity walks and other events have provided £124,000 for good causes and they have also helped countless followers come to terms with mental health and depression.

Now Kerry, who lives in Keswick, has written a book about how they came together, help and hope he got from Max and the extraordinary bond they share.

Max the Miracle Dog isn’t published until March, but it’s already in the Amazon pre-order bestseller lists.

“It has been extremely nerve-wracking writing it,” admits the author.

“It is not just me and Max, it is my whole life, including my childhood and nobody wants to be judged do they?

“Putting it all out there, you are laying yourself wide open, but the responses have been incredible.”

There are now three spaniels in the Irving household, with Paddy joining a few years ago and one-year-old Harry being welcomed in January.

Kerry says: “There is a lot of love for the dogs. When we put up a picture of Max or Paddy or all of them, people say ‘our Max’ or ‘our Paddy’. They feel part of it.

“It is the feelgood factor. People like to see pictures of where we are and what we are doing.”

Kerry says that it is only fairly recently that people have started to appreciate the mental health importance that Max has had in his life.

“We have been going into schools and giving presentations on mental health and the benefits of getting outside and how animals can interact with humans and what they can do for us.”

The book came about because the mum of one of the top executives at publisher Harper Collins is a fan.

Harper non-fiction editor Zoe Berville negotiated the deal directly with Kerry. It took him “two or three months” to decide to go ahead with it.

He explains: “ She contacted me and asked if I’d thought about writing a book. I have been asked countless times.

“I always think our story is just normal. When we started talking with Harper Collins they were really helpful and have supported us. But it has been hard work.

“When you start writing things down, you relive it, you get every emotion, every feeling. Everything comes back.

“There were a lot of tears. You can’t help but bring back the anxiety of it all.

“It has been hard work. There are days where you write a segment and you relive it and you are awake three days thinking about how that will come across with someone.

“It has helped me. The more you talk about it, the better you are. That is the benefit of talking.

Appropriately, Kerry dictated his memories while out on his walks.

“I think the story surprised the publishers. They did not realise everything behind the story,” he says.

“They knew there was the accident and the depression, but there is more to it. They got a bit of an eye-opener - but you’ll have to wait until the book comes out for that!”

The book caps an amazing year for Max and Kerry. In January they appeared on ITV’s Britain’s Top 100 Dogs Live, representing the springer spaniel breed.

Then in May, Max, Kerry and his wife Angela attended a Buckingham Palace garden party and received some extra special royal attention.

Kerry explains: “The invite was for me and the wife, but we managed to get Max invited as a therapy dog.

“One of the Kensington Palace staff follows us on Facebook and showed Prince William the page and he said ‘let’s meet them’.

“They came over to say hello and I told Prince William how Max had helped me through depression and what we had done to inspire others and raise money for charities.

“Kate started talking about her brother and how his dogs had helped him through his depression ,which I never knew about and which she did not need to say.

“We have a big military following with those who serve in Iraq and Afghanistan who turn to the dogs to remind them of home and help them to relax.

“There were a lot of military types at the palace and they queued up to see Max.

“It was so humbling to see what he meant to them and the benefits he had given.”

Just three weeks later, the Duke and Duchess of Cambridge made a point of seeking out Kerry and the dogs when they visited Keswick.

“It was just the proudest day to be stood in my home town in front of all those people and to chat to Prince William and Kate,” says Kerry.

Announcing the book on their Facebook page, Kerry said: “Max saved me from an illness that unwittingly brought me anxiety, panic attacks, an incredible guilt complex, sleep deprivation, the feeling of being worthless, to being an unwanted burden, the loss of friends and of all my confidence.

“It was an illness that put me in a downward spiral, very near to the edge of ending it all.

“Max gave me back my self esteem, brought me a brighter future, introduced me to a new thought process.

“He gave me the will to see in the next day, the next week, the next month. He gave me hope, showing me the freedom of being outside once again, walked patiently beside me and helped conquer my fears, diverting my darkest thoughts to a much better and happier healthier place.

“Writing this book may go a little way to repaying Max, but the debt is much larger than that. Max showed me the very essence of a true companionship. Max helped me win my personal battle with depression.

“He’s my miracle dog.”