Found it: Letter to Jenny Longuet, December 7, 1881 (Marx on pain)

Letter to Jenny Longuet, December 7, 1881

I still have to paint my chest, neck, etc., with iodine and, when regularly repeated, this produces a somewhat tiresome and painful inflammation of the skin. The said operation, which is only being performed to prevent a relapse during convalescence (now complete apart from a slight cough), is therefore doing me sterling service just at this moment. There is only one effective antidote for mental suffering, and that is physical pain. Set the end of the world on the one hand against a man with acute toothache on the other.