This is older and more universal even than 'The Philosopher.'
Vairagya (dispassion) in the Upanishads, Bhagavad Gita and the Yoga Sutras... these texts additionally speak of non-attachment to ephemeral things... but this is NOT advice amounting to not-feeling! It is an attitude of experiencing and enjoying but not become chained to one's pleasures or pains.
The Buddha also counseled developing non-attachment, cleaving to the Middle Path, and ultimately achieving upeksha, or equanimity.
This entire set of philosophies, including old 'stotle, is all quite common-sense, I would dare say.
The real question is HOW one develops it on a day-to-day basis. Indic religions counsel meditation and some additionally recommend devotion to a/the Deity. Following basic moral codes... same thing, pretty much, in Abrahamic traditions.
The problem, in my opinion, is that everybody knows this and practically no one actually follows the path towards true equanimity.