One example comes from T.H. White, in his 1958 retelling of the Arthurian legend in Once and Future King. The wizard Merlin is teaching the young bow who would become King Arthur, but at this point in the story is known as the Wart. White writes:
I always liked Wart's down-to-earth and so-very-human rejoinder.
"The best thing for being sad," replied Merlyn, beginning to puff and blow, "is to learn something. That is the only thing that never fails. You may grow old and trembling in your anatomies, you may lie awake at night listening to the disorder of your veins, you may miss your only love, you may see the world about you devastated by evil lunatics, or know your honour trampled in the sewers of baser minds. There is only one thing for it then—to learn. Learn why the world wags and what wags it. That is the only thing which the mind can never exhaust, never alienate, never be tortured by, never fear or distrust, and never dream of regretting. Learning is the thing for you. Look at what a lot of things there are to learn—pure science, the only purity there is. You can learn astronomy in a lifetime, natural history in three, literature in six. And then, after you have exhausted a milliard lifetimes in biology and medicine and theo-criticism and geography and history and economics—why, you can start to make a cartwheel out of the appropriate wood, or spend fifty years learning to begin to learn to beat your adversary at fencing. After that you can start again on mathematics, until it is time to learn to plough."
"Apart from all these things," said the Wart, "what do you suggest for me just now?
Another example is from Bertrand Russell's quirky 1930 book-length essay, The Conquest of Happiness. He writes:
Perhaps the best introduction to the philosophy which I wish to advocate will be a few words of autobiography. I was not born happy. As a child, my favourite hymn was: 'Weary of earth and laden with my sin'. At the age of five, I reflected that, if I should live to be seventy, I had only endured, so far, a fourteenth part of my whole life, and I felt the long-spread-out boredom ahead of me to be almost unendurable. In adolescence, I hated life and was continually on the verge of suicide, from which, however, I was restrained by the desire to know more mathematics.
Now, on the contrary, I enjoy life; I might almost say that with every year that passes I enjoy it more. This is due partly to having discovered what were the things that I most desired and having gradually acquired many of these things. Partly it is due to having successfully dismissed certain objects of desire - such as the acquisition of indubitable knowledge about something or other - as essentially unattainable. But very largely it is due to a diminishing preoccupation with myself.
Like others who had a Puritan education, I had the habit of meditating on my sins, follies, and shortcomings. I seemed to myself - no doubt justly - a miserable specimen. Gradually I learned to be indifferent to myself and my deficiencies; I came to centre my attention increasingly upon external objects: the state of the world, various branches of knowledge, individuals for whom I felt affection. External interests, it is true, bring each its own possibility of pain: the world may be plunged in war, knowledge in some direction may be hard to achieve, friends may die. But pains of these kinds do not destroy the essential quality of life, as do those that spring from disgust with self. And every external interest inspires some activity which, so long as the interest remains alive, is a complete preventive of ennui. Interest in oneself, on the contrary, leads to no activity of a progressive kind. It may lead to the keeping of a diary, to getting psycho-analysed, or perhaps to becoming a monk. But the monk will not be happy until the routine of the monastery has made him forget his own soul. The happiness which he attributes to religion he could have obtained from becoming a crossing-sweeper, provided he were compelled to remain one. External discipline is the only road to happiness for those unfortunates whose self-absorption is too profound to be cured in any other way. ...
Of course, it would be silly to argue that those who feel sad just need to take up topology or computational statistics. And it would be silly to argue that struggling to learn is an unalloyed pleasure. But I do think there is something to the idea that happiness is facilitated by a sense of agency and understanding about one's life and work, and the act and accomplishment of learning across many dimensions of life--including the nonacademic dimensions--is a meaningful part of happiness.