Epictetus said this quote

It isn't death, pain, exile or anything else you care to mention that accounts for the way we act, only our opinion about death, pain and the rest.