Visits to GPs, specialist clinics and assorted therapists were all in vain – nobody could find an obvious physical cause or offer effective treatment.
Sometimes the excruciating, stabbing pains seemed to be triggered by stress or tiredness or alcohol but at other times those factors had no effect.
Doctors diagnosed tension headaches and prescribed several medications and other therapies but none of these gave lasting relief, while over-the-counter painkillers had no effect whatsoever.
By the start of last year I had headaches two or three times a week and they lasted up to four days at a time. My working life was blighted, my weekends sometimes obliterated and my holidays often dominated by searing pains.
Then 12 months ago my headaches stopped and apart from three or four brief episodes, they have not returned. The solution was not a new wonder drug or change of lifestyle – it was hypnosis.
Ordinarily I would never have considered undergoing hypnosis.
As a medical journalist I am generally sceptical of so-called complementary therapies, always insisting on clear evidence of effectiveness in scientific trials for all treatments whether orthodox medicine or alternatives.
Yet writing my last book, The Mesmerist led me into uncharted territory.
I was lured into writing about mesmerism – effectively hypnosis – by the extraordinary true story of the teenage Okey sisters, who enthralled Victorian London.
Watched by journalists, scientists and dignitaries, the girls would sing, cavort and dance, lift heavy weights and withstand electric shocks when mesmerised.
Their doctor, Professor John Elliotson, was convinced the effects were caused by magnetic waves; his colleagues were equally certain that he was being hoodwinked.
Researching the story, I reluctantly came to the conclusion that I needed to try hypnotism for myself - though I remained highly sceptical that it would work and deeply resistant to the idea of giving up control.
As with most people, my understanding of hypnosis had been influenced by stage shows featuring dark-suited men who persuaded hapless volunteers to undress or eat raw onions.
Yet researching my book convinced me to discount the popular myths.
Although much about hypnosis is still unexplained, studies suggest about 90 per cent of us are susceptible.
Scans reveal that people under hypnosis show a unique pattern of brain activity although whether this is a special state – a trance – is hotly debated.
Experts now agree that nobody can be hypnotised against their will or compelled to do something they don't want to do.
However, although most studies are too small or poorly conducted to be accepted as strong evidence, there is good reason to believe hypnosis can help break habits such as smoking and overeating, treat symptoms of certain conditions such as anxiety and irritable bowel syndrome and relieve pain.
Some even use hypnosis instead of chemical anaesthesia for surgery or dental procedures. How hypnosis works, whether through meditation, suggestion, placebo effect or something else, remains a mystery.
Finally I took the plunge. Last May I visited Dr Rumi Peynovska, who is a medical doctor and psychotherapist as well as a hypnotherapist, in Harley Street.
The session was reassuringly down-to-earth. There was no couch, no swinging watch, no command to look into her eyes. Instead, I sat in an armchair while Rumi took me through a series of relaxation techniques.
In a loud, melodic voice, she told me to imagine I was holding a heavy book then visualise walking down steps to a relaxing place before opening a door into a room with a dial which controlled my headaches.
Whenever I felt any pain I could turn down this dial. At no point did I think I was in a trance or had lost control. I felt fully aware throughout.
As I left I certainly felt relaxed but had no serious expectations. Yet since that one session I have had almost no headaches. Now when I feel a headache threatening I take myself through the same steps, essentially self-hypnosis, for five or 10 minutes.
Within half an hour or so the symptoms have gone. On the few occasions a full-blown headache has developed I've lain down in a dark room and gone through the same process.
An hour or so later my headache has lifted. Other factors may have been responsible but the fact I now feel able to prevent or control my headaches suggests hypnosis was the key.
For me it makes perfect sense. In the past I saw myself as someone who had headaches and therefore I expected headaches to occur. Now I have broken that cycle, I tell myself a different story.
I'm no longer someone who has headaches.
If you want to try hypnosis, it is best to find a hypnotherapist with a medical background through a reputable organisation such as the UK Council for Psychotherapy, British Society of Clinical and Academic Hypnosis or National Hypnotherapy Society.