I've been a runner all my adult life. At 6ft 7in and 17 stone, I don't fit the normal profile of a long-distance athlete, but I'm very fit and experienced. Four years ago, aged 44, I was at my peak fitness. I was a club runner in Yorkshire, where I live, doing fell running at marathon distances. I was planning to do the Three Peaks Race and had entered my fourth marathon.

It was my second London marathon, and I was training hard – five days a week – aiming to run it in less than four hours. In the build-up, I did a couple of 20-mile runs, and my times suggested I could finish the marathon in around three hours 40 minutes, which I was really pleased about. I've always been pretty obsessed with my times: I'm a competitive person and, like many runners, believed that if you're not exhausted by the end of a race, you haven't tried hard enough.

On the day of the race, I felt fantastic. It was a sticky day, but a bit of rain had cooled things off and everything was going to plan. But by mile 19 I knew something wasn't right. It was more psychological than physical: I started to feel that I wasn't completely with it. I felt confused. I remember being unaware of the crowds. I'd arranged to pass my wife and wave to her along the Embankment, at around the 24-mile mark, and forgot. By the time I saw Big Ben, just before the finish, I felt I was running through treacle. I wasn't aware of being in pain, but I was exhausted. I had to dig down to a level I hadn't done before.

When I turned the final corner on to the last 200m and saw the finish, I knew I was going to make it in less than four hours. And that's the last thing I remember. As soon as I'd seen the clock, I must have switched off. Witnesses said that when I crossed the line, I was staggering all over the place. My twin brother, who was watching on TV at home in Leeds, saw me collapse and got on the first train to London. He just knew it was serious. I don't remember this, but I must have managed to collect my medal before taking myself to the medical tent, because it was around my neck when I checked in there. And that's when I collapsed.

Apparently my temperature was sky high, I was confused, having trouble breathing, and my CK levels [creatine kinase, a protein] were high – these also rise after heart attacks or strokes. They inserted tubes to help me breathe and then I went to St Thomas' hospital by ambulance.

I had seriously overdone it and my body had overheated, forcing my liver and kidneys to shut down. They put me in a medical coma for three days, to allow my body to recover. I had also contracted pneumonia – the doctors said it was likely I'd had an infection on the day of the race, and that was why my body had overheated. They later told me that people don't usually pull through this sort of condition, and that the only reason I did was because I was so fit and because of the work of the doctors at the finish line. They saved my life.

When I came round, I saw my wife, brother and sister standing by my hospital bed. My first question was, what time did I do? (The answer was three hours, 55 minutes and 46 seconds). And my second one was, why am I here? My wife had been by my side the whole time, and I put her through so much strain and worry. It was terrible for her: she still won't talk about it, and won't go back to London. I feel so guilty.

I was discharged a week later. I was an emotional wreck. The run-up to the race had defined me for so many months, and I felt I'd let down everyone who'd sponsored me. But most of all I kept thinking, how could this happen to me? The race had nearly killed me. With hindsight, I should have listened to my body and walked, but then I would have been robbed of my finish time.

It was nearly four months before I started to feel better. During those weeks, I started to think about my priorities. I love running, but achieving certain times can become all-consuming, particularly if you're a club runner. Today, I've got a clean bill of health. I stay just fit enough. I swim, ride my bike and go for runs locally with my dog, but I don't race. I'd never put my wife through anything like that again, and I've realised that times just aren't that important. The joy of running is taking in your surroundings, and you can do that better from the back.

• As told to Hannah Booth

Do you have an experience to share? Email experience@theguardian.com