In 1826, at the age of 20, John Stuart Mill sank into a suicidal depression, which was bitterly ironic, because his entire upbringing was governed by the maximisation of happiness. How this philosopher clambered out of the despair generated by an arch-rational philosophy can teach us an important lesson about suffering.

Inspired by Jeremy Bentham’s ideals, James Mill’s rigorous tutelage of his son involved useful subjects subordinated to the utilitarian goal of bringing about the greatest good for the greatest number. Music played a small part in the curriculum, as it was sufficiently mathematical – an early ‘Mozart for brain development’. Otherwise, subjects useless to material improvement were excluded. When J S Mill applied to Cambridge at the age of 15, he’d so mastered law, history, philosophy, economics, science and mathematics that they turned him away because their professors didn’t have anything more to teach him.

The young Mill soldiered on with efforts for social reform, but his heart wasn’t in it. He’d become a utilitarian machine with a suicidal ghost inside. With his well-tuned calculative abilities, the despairing philosopher put his finger right on the problem:

[I]t occurred to me to put the question directly to myself: ‘Suppose that all your objects in life were realised; that all the changes in institutions and opinions which you are looking forward to could be completely effected at this very instant: would this be a great joy and happiness to you?’ And an irrepressible self-consciousness distinctly answered: ‘No!’ At this my heart sank within me: the whole foundation on which my life was constructed fell down.

For most of our history, we’ve seen suffering as a mystery, and dealt with it by placing it in a complex symbolic framework, often where this life is conceived as a testing ground. In the 18th century, the mystery of suffering becomes the ‘problem of evil’, in which pain and misery turn into clear-cut refutations of God’s goodness to utilitarian reformers. As Mill says of his father: ‘He found it impossible to believe that a world so full of evil was the work of an Author combining infinite power with perfect goodness and righteousness.’

For a utilitarian, the idea of worshipping the creator of suffering is not only absurd, it undercuts the purpose of morality. It channels our energies toward the acceptance of what we should remedy. To revere the natural order could even turn us into moral monsters. Mill says: ‘In sober truth, nearly all the things which men are hanged or imprisoned for doing to one another, are nature’s every day performances.’

What Mill calls the ‘Religion of Humanity’ involves pushing aside the old conception of God, and taking over responsibility for what happens in the world. We’re to become the good architect that God never was.

Redesigning the world hasn’t proven easy. Mill claims that our power to inflict suffering is small next to nature’s: ‘Anarchy and the Reign of Terror are overmatched in injustice, ruin, and death, by a hurricane and a pestilence.’ But that’s hard to maintain after the 20th century. What’s the 1755 Lisbon earthquake compared with Auschwitz? What’s a flu epidemic next to Hiroshima? The potential disasters of global warming or nuclear war show that apocalypse isn’t just the prerogative of God.

But the problem isn’t limited to the Religion of Humanity’s catastrophes. Even when things materially improve because of our commitment to utilitarian principles, our increased happiness often doesn’t register as meaningful. Mill’s irrepressible ‘No!’ can be distinctly heard in those I call ‘exiteers’, the growing number of people who, despite their ideological differences, share a desire to exit the system, sometimes with a bang. The irrepressible ‘No!’ haunts even comfy lives in the form of nagging anxieties muted by a steady stream of drugs and distractions. When we see each other in terms of usefulness, as Jean-Paul Sartre observed long before Facebook and Twitter: ‘Hell is other people.’

The problem with our attempt to play God is that it splits us into fixers and problems, marketers and consumers, biotechnicians and patients, entertainers and the entertained, managers and subjects, elites and deplorables, gods and beasts, when we should be workers, doers, caregivers, artists, teachers, students and citizens – roles that involve an openness to risk and vulnerability.

The utilitarian take on the problem of evil is half-right. Suffering ultimately outstrips our goals and beliefs. To claim otherwise is heartless. But it’s wrong to think that the problem of evil brushes aside God or the goodness of nature. When we refuse to accept a fundamental dimension of suffering, we suffer worse. There’s an immense mystery at the heart of being human: the paradox of opposing and accepting suffering. To abandon either side of the paradox is the real problem of evil.

The best things in life clue us into the mystery. Think of art, which by evoking our tragedies fills us with joy. Think of humour, which by registering our humiliations makes us roar with laughter. Think of forgiveness, which allows us to judge and be judged without destroying our relationships. Think of freedom, which by opening us to error gives our lives weight. Though these mysteries don’t preclude the belief in progress, they don’t subordinate all our energies to it. They might often be useless for material improvement, but their uselessness is extremely useful for a meaningful life.

Here’s another irony: what first lifted Mill out of his utilitarianism-induced depression was an act of suffering. Reading a historian’s account of losing his father as a boy, Mill started crying, and the fact that he was crying filled him with happiness: ‘I was no longer hopeless: I was not a stock or a stone.’

Next, he explored Romantic poetry, which nourished the ecosystem of his inwardness. By adding an affective dimension to his life’s projects, literature revealed a new horizon of value, one drawn by the paradox of suffering.

Most importantly, Mill fell in love – with a married woman. After Harriet Taylor’s husband died, Mill wryly observed: ‘[I]t was granted to me to derive from that evil my own greatest good.’ Not only did his eventual wife possess the intellectual vigour that Mill admired in his father, she embodied the poetry that he never got from his upbringing: ‘What was abstract and purely scientific was generally mine; the properly human element came from her.’

Mill tries philosophically to resolve the paradox of suffering by arguing that higher goods such as love and literature are ultimately more satisfying than basic forms of pleasure. In some sense, that’s true. But the terms of this satisfaction are no longer utilitarian; they have more to do with adventure, beauty, even holiness. As the political philosopher Michael Sandel puts it in Justice: What’s the Right Thing to Do? (2009): ‘Mill saves utilitarianism from the charge that it reduces everything to a crude calculus of pleasure and pain, but only by invoking a moral ideal of human dignity and personality independent of utility itself.’

We should be wary of the Religion of Humanity, because subordinating our lives to utility hollows them out. But we have lots to learn from Mill’s fierce desire to add poetry to progress. Let’s rediscover the paradox that George Herbert – one of those poets excluded from Mill’s education – deftly expressed in 1633:

I will complain, yet praise;

I will bewail, approve:

And all my sowre-sweet dayes

I will lament, and love.

Without goods that explode utilitarianism and open us to the mystery of suffering, even the happiest life is miserable.

Seven Ways of Looking at Pointless Suffering by Scott Samuelson is out now via The University of Chicago Press.