Despite reflecting on the good life for more than 2,500 years, philosophers have not had much to say about middle age. For me, approaching 40 was a time of stereotypical crisis. Having jumped the hurdles of the academic career track, I knew I was lucky to be a tenured professor of philosophy. Yet stepping back from the busyness of life, the rush of things to do, I found myself wondering, what now? I felt a sense of repetition and futility, of projects completed just to be replaced by more. I would finish this article, teach this class, and then I would do it all again. It was not that everything seemed worthless. Even at my lowest ebb, I didn’t feel there was no point in what I was doing. Yet somehow the succession of activities, each one rational in itself, fell short.

I am not alone. Perhaps you have felt, too, an emptiness in the pursuit of worthy goals. This is one form of midlife crisis, at once familiar and philosophically puzzling. The paradox is that success can seem like failure. Like any paradox, it calls for philosophical treatment. What is the emptiness of the midlife crisis if not the unqualified emptiness in which one sees no value in anything? What was wrong with my life?

In search of an answer, I turned to the 19th-century pessimist Arthur Schopenhauer. Schopenhauer is notorious for preaching the futility of desire. That getting what you want could fail to make you happy would not have surprised him at all. On the other hand, not having it is just as bad. For Schopenhauer, you are damned if you do and damned if you don’t. If you get what you want, your pursuit is over. You are aimless, flooded with a ‘fearful emptiness and boredom’, as he put it in The World as Will and Representation (1818). Life needs direction: desires, projects, goals that are so far unachieved. And yet this, too, is fatal. Because wanting what you do not have is suffering. In staving off the void by finding things to do, you have condemned yourself to misery. Life ‘swings like a pendulum to and fro between pain and boredom, and these two are in fact its ultimate constituents’.

Schopenhauer’s picture of human life might seem unduly bleak. Often enough, midlife brings with it failure or success in cherished projects: you have the job you worked for many years to get, the partner you hoped to meet, the family you meant to start – or else you don’t. Either way, you look for new directions. But the answer to achieving your goals, or giving them up, feels obvious: you simply make new ones. Nor is the pursuit of what you want pure agony. Revamping your ambitions can be fun.

Still, I think there is something right in Schopenhauer’s dismal conception of our relationship with our ends, and that it can illuminate the darkness of midlife. Taking up new projects, after all, simply obscures the problem. When you aim at a future goal, satisfaction is deferred: success has yet to come. But the moment you succeed, your achievement is in the past. Meanwhile, your engagement with projects subverts itself. In pursuing a goal, you either fail or, in succeeding, end its power to guide your life. No doubt you can formulate other plans. The problem is not that you will run out of projects (the aimless state of Schopenhauer’s boredom), it’s that your way of engaging with the ones that matter most to you is by trying to complete them and thus expel them from your life. When you pursue a goal, you exhaust your interaction with something good, as if you were to make friends for the sake of saying goodbye.

Hence one common figure of the midlife crisis: the striving high-achiever, obsessed with getting things done, who is haunted by the hollowness of everyday life. When you are obsessed with projects, ceaselessly replacing old with new, satisfaction is always in the future. Or the past. It is mortgaged, then archived, but never possessed. In pursuing goals, you aim at outcomes that preclude the possibility of that pursuit, extinguishing the sparks of meaning in your life.

The question is what to do about this. For Schopenhauer, there is no way out: what I am calling a midlife crisis is simply the human condition. But Schopenhauer was wrong. In order to see his mistake, we need to draw distinctions among the activities we value: between ones that aim at completion, and ones that don’t.

Adapting terminology from linguistics, we can say that ‘telic’ activities – from ‘telos’, the Greek word for purpose – are ones that aim at terminal states of completion and exhaustion. You teach a class, get married, start a family, earn a raise. Not all activities are like this, however. Others are ‘atelic’: there is no point of termination at which they aim, or final state in which they have been achieved and there is no more to do. Think of listening to music, parenting, or spending time with friends. They are things you can stop doing, but you cannot finish or complete them. Their temporality is not that of a project with an ultimate goal, but of a limitless process.

If the crisis diagnosed by Schopenhauer turns on excessive investment in projects, then the solution is to invest more fully in the process, giving meaning to your life through activities that have no terminal point: since they cannot be completed, your engagement with them is not exhaustive. It will not subvert itself. Nor does it invite the sense of frustration that Schopenhauer scorns in unsatisfied desire – the sense of being at a distance from one’s goal, so that fulfilment is always in the future or the past.

We should not give up on our worthwhile goals. Their achievement matters. But we should meditate, too, on the value of the process. It is no accident that the young and the old are generally more satisfied with life than those in middle age. Young adults have not embarked on life-defining projects; the aged have such accomplishments behind them. That makes it more natural for them to live in the present: to find value in atelic activities that are not exhausted by engagement or deferred to the future, but realised here and now. It is hard to resist the tyranny of projects in midlife, to find a balance between the telic and atelic. But if we hope to overcome the midlife crisis, to escape the gloom of emptiness and self-defeat, that is what we have to do.

Midlife: A Philosophical Guide by Kieran Setiya is out now through Princeton University Press.