I met my miniature dachshund, Mia, at a rescue centre five years ago. She was one of a litter of 12-week-old puppies confiscated from a puppy farm. I hoped she would be my assistance dog for my health problems. Since birth, I have suffered with a type of heart arrhythmia called ventricular tachycardia. My heart races and, if I don't take medication immediately to slow it, I lose consciousness. I've had to be rushed to hospital to have it restarted. Unrelated to that, at 19 I started to lose my hearing and now struggle with high-pitched sounds such as the phone or doorbell ringing.

I was studying to be a vet, so the idea of having an assistance dog appealed to me – I love animals. The theory was that Mia would alert me when the phone was ringing or when my heart rate was speeding up and I had to take emergency medication. When she was 16 weeks old, she was assessed by a charity that trains pets to become assistance dogs. I hoped the immediate and instinctive bond Mia and I shared when we met meant she'd be suitable.

She qualified as my assistance dog just before her second birthday. Mia learned to alert me just before my arrhythmia starts by making a horrible screeching noise and jumping up at me. She ferrets in my handbag and brings me my heart medicine. She puts her paw on my leg to inform me when the phone's ringing. Once we were in B&Q when the fire alarm sounded and, executing her training perfectly, she lay on the floor and stared at me, hard, to tell me a siren was blaring.

One evening in November 2011, I was at my computer when Mia leapt on to my lap and nuzzled into the flesh at the top of my left breast. She closed her eyes and licked furiously. That frightened me because it's what she does when I have a bruise or cut.

I pushed her gently away but she fixed her eyes on mine and stared at me intently, as she does when she's alerting me to something. I was uneasy now. Mia seemed certain there was a problem with the area at the top of my breast. I couldn't distinguish anything – my breasts are naturally lumpy – so it was difficult. All evening Mia attempted to leap on to my lap and tend to the area of skin where she perceived a problem. The following morning, I visited my GP with a sense of dread. I asked for an ultrasound or a mammogram. I didn't start the consultation by telling him that my dog had alerted me to the possible abnormality – I was aware it might sound far-fetched, but when he was dismissive, saying it was unlikely I had breast cancer because I was only 24, I explained.

"I know dogs detect cancer and my dog is determined there's something wrong with my breast," I said firmly. Then I informed him that, as I trusted my dog, I wasn't leaving his surgery until he'd made me a hospital appointment.

My faith in Mia's diagnostic abilities wasn't misplaced. I had an ultrasound within a week and, sure enough, there was a lump that a biopsy later confirmed was grade 2a breast cancer. Two days later, I was in surgery having the lump removed. Then I started radiotherapy – five days a week for three weeks. I was angry. I was only 24 and I'd already suffered so many health problems.

It made everything else harder. Training to be a vet requires 100% dedication and, with fighting cancer and having intense and exhausting radiotherapy, I couldn't give that, so I had to drop out of university. They were really hard times. My relationship broke up and I had to move back home with my parents. Mia was by my side through it all. Cuddling her after bad news or a gruelling session of treatment alleviated some of the pain.

None of the oncologists I met during my ordeal was sceptical about Mia's role in diagnosing my cancer – they had heard it before. There's a charity called Medical Detection Dogs that trains dogs to sniff out cancer, and its work is endorsed by Cancer Research UK. Scientists are researching how dogs possess this diagnostic ability so that humans can harness it.

Fortunately, my cancer hadn't spread but it will be another 16 months of scans before doctors grant me the all clear. Meanwhile, I'm rebuilding my life. No matter what life serves up, the bond between Mia and me will always be incredibly strong.

• As told to Jane Common

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