Epictetus said this quote

It is more necessary for the soul to be cured than the body, for it is better to die than to live badly.