Early one summer's morning, I was taking part in an Australian Navy counter-terrorism exercise, swimming on my back through the waters of Sydney Harbor.
All was going smoothly until suddenly I felt something smack me hard on the leg. I rolled over and looked down... straight into the cold black eyes of a massive bull shark, one of the most ferocious predators ever to stalk the world's oceans.
I peered closer through the murky water and could see it had something in its massive jaws between its teeth. My leg.
The next five seconds turned my whole life upside down.
Up to that point, I'd been living my dream. As a member of the Navy's elite clearance diving unit - our equivalent of the US Navy Seals - I'd travelled the world with the forces, taken part in joint Australia-US military exercises, and spent as much time as I could in my beloved ocean. At 31 years old, I couldn't imagine a more perfect existence.
But then came the shark, and the fight for my life.
My first instinct was to slash at the shark's eye, but as soon as I went to raise my right hand, I realized I couldn't; the shark had clamped its jaws over my wrist too. I then tried to jab it in the eye with my left hand, but on the angle it was holding me, I couldn't reach. Instead, I madly lunged to heave its head off me, but that only served to push the teeth of its lower jaw deeper into my flesh.
Finally, summoning every iota of strength I possessed, I punched it on the nose, as hard as I possibly could.
Enraged, it started shaking me, its teeth working like a saw on my limbs. That's when the pain started. Then it pulled me under the water, we surfaced, and it pulled me down again, shaking me like a rag doll.
Then, I figured, it must have lost its grip because I was free. I tried to swim away as fast as I could, but looked up and realized my hand was missing. I couldn't feel my leg either. But after what felt like the longest swim of my life, a Navy dinghy arrived and my mates pulled me from the water. They laid me down on the floor of the boat where, technically, I died before they brought me back to life, and then taken straight to hospital, hovering between life and death.
When I finally came round again, I was relieved to see my leg was still there. But not for long. The doctor broke it to me that the shark had taken all the back of my thigh, including the sciatic nerve, the biggest peripheral nerve in the body. As a result, that leg, were I to keep it, would always be useless. If I let him amputate it, however, I could be given a prosthetic, and I could be running again within a year.
I told him to take it and turn me into a Terminator... or at very least, Steve Austin, the Six Million Dollar Man. Clearly the morphine and ketamine painkillers were doing their job and then some.
At that point, I realized that I could either curl up in a ball and harp on about my woes and how hard life is, alienate everyone I loved and have a shit life. Or I could brace up, make the very best of what I had left, and build a new life for myself. Put like that, it felt like a no-brainer.
The day after the op to take my leg, the doctor was shocked to come into the ward and discover me doing chin-ups on the bar above my bed with my good arm. I'd also persuaded my friends to bring me in weights, exercise resistance bands and protein powder so I could start training immediately for my recovery. I found taking charge of such a difficult situation, and being immediately proactive, was the best way for me of coping with what had happened. There was no way I was going to be a passive victim.
I learned that my mental recovery was crucial. The most important thing was how I felt about myself. If I was optimistic, and surrounded myself with strong, positive, encouraging people then I convinced myself I'd always find a way of accomplishing things.
Of course, there were tough times. The first day I came out of hospital, it really hit me how much I could no longer do, like put toothpaste on a brush and tie my shoelaces. But instead of worrying about those things, I focussed instead on the things I could do. The stuff you can't do any more? Forget it. Move on to the things you can do and then, later, when you're more prepared, go back and learn to do the stuff you can't, such as learning to write with my left hand.
Besides, I knew it could have been much worse. I could still function to a high degree. There were people out there in the world with much greater problems who had to rely on others to cope. I was comparatively lucky.
One of the biggest challenges was convincing the Navy that I could still do my job. At every stage, I had to prove to them I was capable, and I felt the need often to show I could be twice as capable as some of my colleagues. That was pretty life-affirming too!
But I really wanted to go back into the water. I'd grown up swimming in the ocean and had always loved it. I felt at home there. It was a big part of my life.
Some people asked me if I wasn't afraid that I'd be attacked again by a shark, but I'm not. I'd have to be pretty unlucky to be attacked again, and likely as not the next shark will get a mouthful of a prosthetic. I've even spoken at the United Nations in favour of shark conservation.
Besides, now I know I've faced pretty much the worst that life can throw at me, and survived, and thrived. I know the human body can endure much more than we give it credit for, and with determination and the right attitude you can achieve anything you set your mind to. I'm looking to the future with confidence and optimism.
Paul de Gelder's book, No Time For Fear: How a shark attack survivor beat the odds [Penguin, $22.00], is being released in the US the last week of April.
Every Friday, HuffPost's Culture Shift newsletter helps you figure out which books you should read, art you should check out, movies you should watch and music should listen to. Learn more