My NHS dietician says that January is a dangerous month for diabetics such as me. The shops are full of Christmas leftovers: those high-calorie, nutrient-light foodstuffs, now for sale at massive discounts – confectionery collections, deep-filled mince pies, presentation tins of chocolate biscuits. You exert all that willpower over the festive period, and just when you think it’s safe to go back into the supermarkets …

But in the last year I’ve pretty much stopped going into supermarkets. Or takeaways. Or fast-food joints. Not that I’ve stopped eating their products – I’ve restricted myself to hoovering up what other people bring on to the streets and squander: my own personal Deliveroo, free of charge.

From quinoa salads discarded at farmers’ markets to pub grub abandoned by fellow diners, it can be quite a varied regime. Park yourself in a central London square on a nice day, and the pricey rice bowls from eateries such as Itsu or Benugo, often still laden with dumplings and prawns and spicy vegetables, pile up alongside overflowing bins. Once I ate my children’s leftovers. Now I eat leftovers from strangers.

I’ve fought a lifelong battle with an urban environment that encourages unhealthy eating – the obesogenic environment, as it has now been defined – and, after being diagnosed with type 2 diabetes, I seemed destined to be on the losing side. But after adopting a diet that friends and family and experts had deep reservations about, I feel transformed.

On a good day I often can take a surplus home – my very own weekly shop

Friends dubbed me the Gutter Gourmet. My mum was horrified. My GP was concerned. It wasn’t just that they felt I would pick up some dreadful lurgy. They were worried about my mental health – this isn’t what decent people did. Certainly a dose of indecency has been the most efficacious medicine I could have hoped for.

When I repurposed myself as the Gutter Gourmet, it was fuelled by anger at the criminal excesses of casual waste all around me (not as a way to save a few bob, as some who know me well contend). The government’s waste advisory body, Wrap, estimates a colossal 10.2m tonnes of annual food waste. Of that the household contribution is 7.3m tonnes. My particular harvest – restaurant plate waste and on-the-go squandering – is more difficult to quantify. Yes, restaurants and cafes bin more than 300m meals a year. But that’s before the consumers I clean up after get a chance to sink their teeth into the complacency industry. One telling survey by the environmental charity Hubbub estimated that our fast food habit generates a staggering 11bn items of mostly unrecyclable packaging waste a year, from cartons to napkins and plastic cutlery. According to my highly unscientific empirical survey, good food is binned in a third of these cartons, from Hawaiian sushi to garishly coloured meringues.

But I was also triggered by the “there’s nothing I can do” apathy of individuals. A couple of years ago, when I was last in hospital with one of the many serious health issues I’d chalked up since that diabetes diagnosis, the bloke in the next bed would order his hot meals for lunch and dinner – and then ignore them when they were delivered, in favour of the grub his family brought in. I talked to him: how can you allow all these wholesome meals to go to waste, and all the effort that goes into producing them, and the nursing resources? It would be so easy not to order them every morning. All he had to do was not tick a few boxes on a form.

He was not interested. Did he not see a link between his behaviour and systemic waste? Why should he change, when it was the system’s fault? It was his right to do with his food as he saw fit. He’d paid for it with his taxes. And what business was it of mine? For a minute I thought he was going to ask me if I liked hospital food. (I do.)

In that hospital stay I gave up on education and plumped for action. If I stopped ordering my own meals, could I eat the ones he ordered and left untouched? It was a deal. When I was discharged, I had an epiphany. All around me were versions of my ward mate, coming out of shops with on-the-go edibles, and discarding them after a few bites or gulps. The Gutter Gourmet was loosed upon the world.

I was diagnosed with diabetes on my 40th birthday. I tried to remedy the situation. I went jogging. I put vegetables in my morning porridge instead of sugar. Carrots. Broad beans. Spring onions. Broccoli. Kale. Spinach. If you persevere, they say your taste buds get used to anything. Mine refused to cast off the memory of crunchy brown sugar melting on hot oats. Every morning I fought the battle anew, and often lost.

I diligently swallowed the pills – Metformin, Levothyroxine, Simvastatin – and jabbed myself with insulin twice a day. What I needed was an injection of willpower. The iron resolve I woke up with to keep all those satanic carbohydrates and sugary treats behind me always seemed to evaporate by mid-afternoon, usually just as the refreshment trolley arrived at work. What harm can one more toffee-coated flapjack do?

‘We are not actually consuming more calories than we were back in the mid-70s. It’s the food we eat that’s different.’ Photograph: Alamy Stock Photo

Quite a lot, it turned out. Since the onset of diabetes, my compromised immune system has got me into one mess after another. The steady gain of bodily fat decommissioned my number one defence against diabetes – exercise – and weaponised its severity. In the past decade I have clocked up five bouts of pneumonia; recurrent raging episodes of cellulitis (a deep-tissue bacterial infection you can see racing up your legs); ulcerated shins; a general vulnerability to every opportunistic infection going; and intermittent erectile dysfunction.

A bloodstream full of sugar, as the top lung professor in my hospital trust put it, is a chemsex orgy venue for microbes. Then my GP weighed in. Unless I pulled my socks up, he warned, eyesight-robbing retinopathy, or peripheral artery disease leading to lower limb amputation, could be just around the corner.

It wasn’t an idle threat – there are about 7,000 lower-limb amputations in the UK each year. I recalled visiting a friend who’d lost a leg in a car accident, years ago. The woman in the next bed on the amputation ward had diabetes. “My doctor told me I had a choice,” she cheerily informed me. “Either the chocolate goes or a leg goes. And I couldn’t give up my Cadbury’s.”

If I’d known as a child that my passion for Cadbury’s, and fry-ups and bakeries and condiments and cakes and puddings, would decades later have me hooked up to IV drips and emergency antibiotics, would it have made any difference?

Probably not. I am a child of the obesogenic revolution. Of course, they didn’t call it obesogenic back in the early 70s. We still had early closing, shops were shut on Sunday, and you couldn’t order so much as a pizza to be delivered.

But our local high streets were changing. In my part of south London, there was always a Wimpy bar or a greasy spoon caff around the corner.

The era of the microwave turned every corner shop into a takeaway. Vesta curries, Findus pancakes, Angel Delight for afters. Baby food for grown-ups, as we lounged in front of the TV.

The first layers of fat that would eventually entomb my pancreas and degrade its production of insulin – the hormone that breaks down glucose into energy in the cells – were being laid down. I am one of two and a half million people in the UK who would suffer. Boyd Swinburn, the New Zealand public health expert who gave the world the term “obesogenic environment”, concluded that the problem is not driven by greed or abnormal appetites, but is a normal response to abnormal environments – encapsulated by the conditions he felt were responsible for the high rates of diabetes and obesity in the Arizona reservations of the Native American Pima people, whom he studied in the late 1980s.

‘I’ve pretty much stopped going into supermarkets. Or takeaways. Or fast-food joints. Not that I’ve stopped eating their products.’ Photograph: Alex Lake/The Observer

My NHS dietician says Swinburn would have recognised similar issues in the south London I grew up in: the aggressive promotion of energy-dense but nutrient-light foods; the beginning of a discount, “bogof” (buy one get one free) checkout culture encouraging you to buy more than you need; high-street domination by takeaways and (relatively) fast food outlets; the ascendancy of sedentary screentime over outdoor exercise.

Although it is estimated that 60% of adults in England are now obese or overweight, we are not actually consuming more calories than we were back in the mid-70s. Indeed, there is evidence that sugar consumption is actually falling. It’s the food we eat that’s different. As George Monbiot pointed out, we eat five times more yogurt; three times more ice-cream; 40 times as many dairy desserts; a third more breakfast cereals; twice the cereal snacks; three times the crisps. All the things I love. Fat-, salt- and sugar-laden foods that in excess can play havoc with the body’s appetite-control systems.

If anything, after my diabetes diagnosis I found it tougher to shun these sugar-loaded foods – and I was weakest when I was on my own. In company, the judgmental gaze of family or friends around the dinner table was a huge deterrent. Try helping yourself to ice-cream when your daughter insists that it’s going to harm you. So, as if I had a secret porn or drug habit, I would wait until everyone was asleep before guzzling digestives or a tub of flapjacks. Away from home, I would find myself slipping into shops, putting transgressive treats into my shopping basket and binge-eating them in bus shelters. At least I never had any leftovers.

Looking back at this furtive behaviour, with that pronounced element of lone gratification, it all seems very reminiscent of addiction. My willpower wilted in the face of all these temptations. All the guilt I felt about letting down all the people relying on me to stay healthy seemed to melt away. It was as if my brain had been hijacked.

Of course, many would argue that this is what the obesogenic environment does. It exists to drive addiction. What chance an individual’s willpower when pitted against an industry that spends billions on coaxing us to overeat?

In London, in good weather, the food-wasters can be very generous. It helps that I work a few days a week at a very swanky magazine group, where very swanky takeaways are crammed, shockingly untouched, into the bins. Recently I extracted a punnet of “soaked berry oats with peanut butter burn”. Never had that before, and it made a great tea with the two doughnuts and a cucumber I found in a Puregym locker on the way home. I did wash the cucumber.

On a good day I often can take a surplus home – my very own weekly shop. But not every day is a good day. Indeed, not every month is a good month. When the temperatures drop and the weather worsens, the outdoor street harvest withers. Cartons of pizza wedged into the bin slots – a big summer staple – lose their allure when they’ve been marinaded into mush by an autumnal downpour. It’s an opportunistic existence, and opportunity does not always knock. Occasionally I have to concede defeat and resort to cooking. It’s a simple back-up plan: oats and bulgur wheat online. Most mornings start with porridge. One or two evenings a week, I rustle up a wholegrain mush. It’s austere, but I like it. And so does my pancreas.

There are seasonal compensations. In the cold weather, people shoal under cover, clutching their comfort food and scrupulously observing the ultra-fashionable law that the real comfort lies in throwing away more food than you eat. My perspective is not very scientific. But it seems to me that people are more profligate than ever, often behaving as if the debate about waste and single-use plastics does not apply to them.

I have been accused of taking food from the mouths of homeless people. But maybe it’s a mark of how much surplus food there is that rough sleepers, who watch me searching for scraps, insist on passing on food items distributed to them by well-meaning shoppers. They won’t take no for an answer. The regular outside my local Aldi says I’m doing her a favour, because the store’s food is so cheap she doesn’t know what to do with all the stuff she’s given.

The biggest compensation of all seems to be my health. For starters I have miraculously avoided all those forms of pestilence that my mother predicted would follow my “unsanitary” refuelling habits. Sorry, Mum. I feel rotten that I haven’t felt rotten. The real gains have been round my diabetes. Obviously I’m happy that my GP’s warnings that I might lose my eyesight, or a limb, have not materialised. I have lost a lot of weight – a key objective for diabetics, and something I had been trying and failing to achieve for years.

How could I have done this on a diet leaning on the sort of carbohydrates – white bread, white rice, pastries, noodles – I am supposed to shun? My diabetic dietician had a theory. “The idea that diabetics can’t eat any carbs or sugary foodstuffs is misplaced. What’s important is moderation and minimising. Your exposure to over-consuming the wrong things has been massively reduced. You are generally eating a few small portions a day, and you have to work pretty hard to find your food. That’s a lot of steps you are doing, so in a way you have transformed yourself into a textbook patient.”

Eureka! The Gutter Gourmet diet is actually beneficial for my diabetes: a daily regime of more exercise, smaller portions, reduced calorific input, reduced fat on the belly and abdomen. Without realising it, I have been making healthy choices. For more than a decade I had tried, and failed, to tackle my morbidity through willpower alone. In the past couple of years I have been empowered by a sense of protest. I align myself with all those people who wash their clothes, and themselves, less to save water. Who don’t fly. It’s all about busting consumerist norms. I don’t feel enslaved, or intimidated, by food, or the food industry, any more. The Gutter Gourmet v The Obesogenic Environment? The tide has turned.