This neglected gem of a book was written by Harriet Martineau, best known for her 19th century tracts on political economy. Now I learn she was a forerunner of behavioral economics, occupying a space somewhere between Burton’s Anatomy of Melancholy and the pain meditations of Dan Ariely, excerpt:
I have spoken of the relief afforded by visitations of severe pain. These really the vital forces, and dismiss the temptation, by substituting torture for weariness — at times a welcome change. The healthy are astonished at the good spirits of sufferers under tormenting complaints; and the most strait-laced preachers of fortitude and patience admit an occasional wonder that there is no suicide among that class of sufferers. The truth is, however, that the influence of acute pain, when only occasional, and not extremely protracted, is vivifying and cheering on the whole. The immediate anguish causes a temporary despair: but the reaction, when the pain departs, causes a relish of life such as the healthy and the gay hardly enjoy. Though a slow death by a torturing disease is a lot unspeakably awful to meet, and even to contemplate, there can be no question to the experience, that illness in which severe pain sometimes occurs is less trying than some in which a different kind of suffering is not relieved by such a stimulus and its consequent sensations.
The Wikipedia page on Martineau is especially good.