An ancient source of this wisdom is Epictetus.

References