He was the editor of the Sun and one of the most influential people in Britain. He was also drunk – every night for 24 years. David Yelland recalls the lowest point of his life, and the long road to recovery

David Yelland. Photograph: David Levene

Happiness is a habit, or at least it is to me, but for a long time I had the habit of unhappiness, the repeat behaviour we call high-functioning alcoholism. For 24 years I was drunk nearly every night. Yet my career spiralled upwards and in the eyes of the world I was a great success. My story is not unusual. The relationship between material "success" and addiction is scarily close.

When I took my first drink, aged 16, it made me feel utterly free and at ease. I felt I could conquer the world. I had been a shy child. I had been told I was adopted and then, a few years later, I lost my hair through alopecia. At school I would lurk behind prefabs avoiding the boys who might pull off my wig and throw it around. They often did. The euphoria that came with my first drink seemed to make everything OK. It seemed to crowd the sadness from my head. I chased that feeling to the extreme. But the truth was I never found that high again; addicts never do, though many die trying.

I had a wonderful Yorkshire childhood, growing up in places like Bridlington, where my grandparents ran a seaside hotel. Dad worked for Barclays Bank and I never thought of them as adopted parents. We were blessed with Paul, born in 1965, my younger brother. But there was an ambition in me, a huge determination to prove the world wrong.

It took me ages to get into journalism. I was so shy I could hardly speak at interview. Yet somehow I went from a local newspaper to the editorship of the Sun in 14 years. How did I do that if I was so drunk? The answer is I did it because I was so drunk: the two habits went hand in hand.

My habit was to work through the day and drink through the night. My system was so strong and my ambition so acute that somehow it worked. I got the top job at the Sun in 1998 when I was 35. I had already been deputy editor of the New York Post. In front of me was five years running Britain's biggest paper and a spell at Harvard Business School. In 2002 I was listed as the 22nd most powerful man in the country.

I cannot speak for other editors and I have no wish to upset my former colleagues, but the Sun was a dangerous place for me to be, because my addictive traits were big box office. I was actually paid to rush to judgment, paid to lash out and attack – it was perfect territory for the drunk. I had 320 people on staff who were paid to agree with me. I had the prime minister on the phone agreeing with me. I had a car, a driver, accounts at the best clubs and hotels around the world.

When I went out and disgraced myself in public – as I did many times – I could silence the diary columns by calling a fellow editor. There are stories I could tell that you wouldn't believe. I was untouchable. I was cocooned and protected, a "made man", an unelected member of a tiny elite that runs the country and never has to pay a price.

Only I did pay a price. Or others did. I had a wife, Tania, at home with breast cancer and a son to whom I was devoted but whom I didn't see enough. Just before we returned from New York I had found out my natural father was an Irish radical with a mistrust of the British, and my mum a children's writer. They had lived in bohemian style in North Yorkshire, they had both marched at Aldermaston. For the first time I understood myself. Yet here I was slam-bang in the middle of what Hillary Clinton once dubbed "the right-wing conspiracy". I felt like a double agent, so I began to act like one. I took homophobia out of the paper entirely (after a bad start in 1998 when we ran the front-page splash: "Are we being run by a GAY MAFIA?"). I wrote leaders defending Islam after 9/11. I swung the paper behind the Irish peace process: I told Mo Mowlam there was radical Galway blood beating in my heart. I ran leaders on art, poetry, Iris Murdoch and the BBC. I began to fall in love with the very things I was supposed to oppose. I was drunk and I was dangerous, but I was having fun.

But I was intensely uncomfortable at the Sun. My job was to pick out people the country could judge to make us all feel better. One day it would be a paedophile, another a fallen politician. But what right did I have to judge? What right do any of us? As an adopted child I knew how close I had come to being in care. The dividing line between privilege and underclass is perilously narrow. In recovery I have found this to be even more the case.

By 2005, I was out of the Sun and back home from Harvard. The drink had taken my marriage and now Tania's cancer was terminal. Our son, Max, had to come first. At about 10pm on 18 July 2005, I rang Promis, a rehabilitation centre in Kent, and spoke to Dr Robert Lefever, its founder and the man who saved my life. They sent a car. In the early hours I arrived. Two men came out of the front door and stood either side of the car. They led me inside where a nurse took bloods and I was examined. I was also searched. I had a BlackBerry with the mobile numbers of most of the Cabinet, the Murdoch family and a chunk of the British elite. It was taken off me and locked away.

I was taken to a room in which two other addicts were asleep. When I tried to open a window I saw it was locked – from the outside. I felt my life was over. I felt more alone that night than I ever wish to again. Yet this was the beginning of a wonderful future.

I was saved just in time. On 8 September 2006, Tania died after a most incredible battle. I did not drink. I was with our son. Soon I acquired new habits. The habit of recovery and that of fatherhood, the habit of healthy work and, in time, the habit of being a loving partner. These are the habits of happiness for me. I began to write, too. I acquired the habit of art. But that is a whole other story.