suggests that
someone who treats themselves badly or neglects their own well-being is unlikely to be capable of treating others well.
Imagine a case where you cannot take care of other people if you cannot take care of yourself.; then “He that is ill to himself will be good to nobody” fits well.