I always felt so happy growing up. If anything, my childhood was too perfect; I never wanted for anything. I was close to my parents, and the youngest child with two doting elder siblings. I was pretty, popular and getting good grades at school.

Looking back, maybe I was a little too sheltered from bad experiences. That all changed when I was 15. My grandmother, to whom I'd always been close, died following a long illness. I was still reeling from her death when within 18 months four of my school friends died – two were killed in car accidents, one took their own life and the fourth died of a brain tumour.

I'd always been positive, but now I was constantly low and lethargic. I wasn't sleeping, and my schoolwork was suffering. I was arguing with my parents and life felt bleak. Before, I'd had a sense of purpose – I wanted to be a veterinary surgeon. Now I felt I'd lost my way.

In early January 2000, my parents had grounded me for staying out all night, but I'd sneaked out to visit a friend. I was on my way home, dreading facing my parents.

So I headed to the local park, alongside a set of railway tracks. It was a freezing cold evening and, for some reason, I thought it was a good idea to shelter in one of the empty carriages on the sidings. I wanted to clear my head, escape home for a bit longer.

"This will get better," I told myself. "No, it won't," a darker voice answered. Just then I heard the deep rumble of a train approaching. "If you throw yourself in front it, all this pain will instantly go away," I suddenly thought. Before I realised what I was doing, I was scrambling up to the train tracks and lying face down across the steel rails.

I closed my eyes tightly – "There's no way I'll survive this," I thought. I was exhausted and waiting for oblivion. The train was approaching and I thought it would hit me – bang, that would be it. But I didn't black out for a second, I was awake the entire time. I heard and felt everything – the vibrations of the train, the screech of grinding metal, and unimaginable pain.

The train thundered over me. The momentum sucked my body upwards, then I was thrown down hard between the tracks, with only my legs hanging over the rails. Everything went quiet. "Am I dead?" I wondered, opening my eyes. I was alive, but trapped under the train. I could feel hot metal inches above my head, and smell smoke.

I managed to angle my head to the right to look out between the carriages. With a strange sense of detachment I could see my jeans and the white sneakers Mum and Dad had given me for Christmas lying some way up the track.

I dug my fingertips into the gravel and dragged myself free of the carriage. I swung my body around so I was lying on my back, facing away from the train. Confused, I reached down to where my legs should have been. When I pulled my hand back, it was covered in blood. Then the pain hit. "Mum, Mum!" I screamed.

I saw a rescue worker talking into a radio, then someone was cutting off my favourite yellow winter coat.

I was rushed to hospital, where doctors told me I'd lost eight pints of blood. Staff crowded around me, shouting orders and pushing needles into my arms. When I came round from my first surgery, my entire family was circled around my bed.

The next few days passed in a haze of medication. I remember one doctor telling me that 33 carriages had run over my body, severing both my legs – my left above the knee joint and the right just below.

I was in hospital for three months, then in and out for several more corrective surgeries. It was a gradual recovery. I completed my final high school exams in hospital, so was able to graduate alongside the rest of my class later that year. Then I was fitted with prosthetics, and learned to walk again with crutches.

In 2003, I was asked to tell my story to a local youth group. From that more speaking engagements followed. I began counselling vulnerable and suicidal teens, telling them my story and reassuring them that, despite how bad things might seem, they could get better. In a strange way, I feel this needed to happen to set me back on the right course. However terrible that night was, ultimately, I got my life back.

The Samaritans can be contacted 24 hours a day, 08457 90 90 90.

• As told to Jacqui Paterson

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