One Sunday during the Thatcher era, I was on my way up the aisle to communion. My little son was toddling along in front of me. In the reverent silence that falls after the hymn has finished, he put back his head and yelled: "Maggie! Maggie! Maggie! Out! Out! Out!" My three-year-old thought a great cosmic war was being fought between Jesus and Maggie. That moment shows how much she dominated our lives and thoughts.

It was the same at work. I was writing for the Channel 4 soap opera Brookside at the time. "A searing indictment of Thatcher's Britain" became a set phrase if you were suggesting a story at the monthly writers' conference. In fact, it sometimes seemed as if the whole of popular culture had been galvanised by its opposition to her. Pop songs (Ghost Town), TV dramas (Boys from the Blackstuff), comedy shows (Spitting Image) children's books (The Tin-Pot Foreign GeneralandtheOld Iron Woman) were ranged against her.

Real dictators have to pay artists to mythologise them. Maggie simply sucked them into her orbit. She may not have provided the arts with cash, but she certainly gave them plenty of material. Why didn't this work? Why wasn't she mocked out of power in the way that, to some extent, John Major was? Maybe by talking about her so much, by letting her fill so much of the cultural space, her enemies only made it harder to imagine life without her. Like the IRA's failed assassination attempt, it just made her look stronger. They made her out to be the devil and forgot that the devil has the best tunes. If Ben Elton was against her, who wouldn't be for her?

Now she's gone and there are firework celebrations, a classic graffito in Belfast ("Iron Lady – Rust in Peace") and Ding Dong! The Witch is Dead! is rocketing up the download charts. None of this is surprising – but it is the same mistake all over again. It adds to the legend ("See how they still hate her!") and what adds to the legend obscures the truth. Dramas that raged, mocked, satirised and exposed won Baftas and Bookers, but did nothing to harm her.

So what should an artist do? A few years ago I was interviewing a young woman who had been a victim of ethnic cleansing. Abducted as a child, she'd been raised inside a cold, regulated, racially defined institution. But she'd grown up to be an articulate, engaging advocate for refugees. At the end of our meeting, I asked her how she had known – growing up in such an unloving environment – that life could be more. "I read a book," she said. What book? A searing indictment of Thatcher's Britain? "Heidi."

There is nothing more subversive than a definition of happiness, a vision of how things could be better. Thatcher, of course, dismissed the very idea that politics could make things better. We would not build Jerusalem; we would deregulate our green and pleasant land and hope the markets would build it for us. This diminished view of politics is the most potent part of her legacy. We are facing a housing crisis. Are we going to build houses? No, we're going to stimulate the market, even though we now know the market is run by skanks and jackasses. This distrust of the state is something which she imported from America. It's not British.

The British have many happy memories of state intervention. It was the state that won the war, the state that founded the NHS and gave us free milk when we were little. We have always believed in the possibility of Jerusalem. It's there in Milton, Blake, GK Chesterton and Oliver Postgate. There's a thread of purpose that runs through our finest moments – the abolition of the slave trade, the winning of votes for women, the defeat of Hitler – a desire to be not just more prosperous but better, to be more equal, more sharing, more accepting of difference, to have fun. It's in all the temporary Utopias we build for ourselves – the well-run caravan site, the Notting Hill carnival, the village fete and Glastonbury.

We are not Sid. We are William Wilberforce and Aneurin Bevin. We are Rosalind Franklin not caring about not getting her share of the credit for discovering the structure of DNA. We are Tim Berners Lee not doing it for the money. Thatcher never understood this. Although she draped herself in the union flag, Thatcher never seemed really to like or understand this country. If you look again at the famous Nationwide incident when Diana Gould caught her out with an awkward question about the Belgrano, you'll see her chanting "only in Britain ... only in Britain ... [could the public be so unappreciative of me]" and thumping the table. I remember thinking: "Oh! She hates us."

In the 1930s, Orwell rightly took the left to task for transferring its patriotism to the Soviet Union. She transferred hers to a kind of imaginary America (hence the contradiction of fighting against European domination while being an absolute doormat to the Pentagon). This is still a very strong thread in conservatism. There are conservatives on both front benches who simply don't get this country. They've retreated from it into fortified Cotswold Trumptons and they pass laws designed to make us more like the United States. They call us "broken Britain" or talk about "making Britain great again". We are great – just not in the way they want us to be. My friends and neighbours think that Ed Miliband should have been angrier about Thatcher during the debate about her in the House of Commons. But we tried that and it didn't work.

It is time to stop going on about the witch being dead and start imagining what might lie over the rainbow.

Frank Cottrell Boyce is a screenwriter and novelist. He was the writer of the 2012 London Olympics opening ceremony.

Andrew Sparrow's rolling coverage of the day's political developments as they happen, including Lady Thatcher's coffin coming to the Commons and a debate on planning which is expect to see Tory MPs rebelling against the government