Women's world marathon record holder Paula Radcliffe said she "might have given up" without the "carrot" of London 2012.
The three-time London Marathon winner will take part in her first marathon since 2009 in Berlin on 25 September.
She suffered Olympic disappointments in Athens and Beijing and has also had a number of injury concerns.
"This year has been the hardest ever and if I didn't have London I might have given up," she told BBC Sport.
"Having injury and illness is always difficult. When you are battling through and you've had a number of setbacks, you wonder if you can take one more. But you get over it and get back to what you enjoy about running and the racing and put it behind you.
"I'd been lying if I said I didn't contemplate giving up, especially when you suffer more and more setbacks.
"I did have a couple of weeks of thinking I wasn't going to do it any more but then a couple of days later I was back and decided I wanted to try and do it. I still enjoy doing what I am doing and when I am healthy there is no place I would rather be.
"You have the carrot of London in 2012 and that is what I am working towards.
"I still think I would be trying to do it for as long as my body keeps allowing me and if London hadn't got the 2012 Games I think I still probably would have been in the sport."
The 37-year-old was fourth in her last marathon outing in New York and since then gave birth to son Raphael last September.
She made her comeback in a 10,000m road race in London in May, finishing third in a race she described as "a disaster" after struggling with a back problem.
But now fully fit again, she is hoping to beat the UK Athletics Olympic qualifying time of two hours 31 minutes on her debut in Berlin and try to get the Olympic medal that is missing from her collection.
"Competing in the London Marathon and in front of a home crowd at the 2002 Commonwealth Games in Manchester are memories that will always be special but imagining what it would be like in London gives you goosebumps," she said.
"Berlin is a great race and a great course and along with Boston is on my wishlist of marathons.
"I want to go out and win and run well and strong and just enjoy it. It's a while since I've been able to do that."