From Ohr Avigdor Shaar Habitachon by Rabbi Avigdor Miller
Just as we have said about life and death that a person’s obligation to serve Hashem requires him to protect himself from death and keep himself alive, so will we say about the requirement of looking for ways to be healthy.
Not only when it’s a matter of life or death does a person have to remain healthy. He shouldn’t do things that harm his health. He shouldn’t become ill as a result of his own negligence. He must take medicines when necessary and he must go to physicians. If he needs surgery, he should do everything that’s necessary to have it done and he may not say, “I trust in Hashem so I won’t have to do it.”
You have to change your middos by yourself; you may not leave it up to Hashem.
The same is true regarding food clothing, and shelter. A person has to go to work to make a living. It may require him to plow and sow and reap the grain. He also needs to earn the money to buy clothing and find a place to live. He must not say, “Hashem will give me a home. I’ll lie down on the park bench and Hashem will have to cause me to find a place.”
He must also do what is necessary to acquire good character qualities (middos) and avoid the opposite. A person may not say, “I’ll trust You Hashem to teach me to be patient.” He has to train himself to overcome his anger and not be impetuous. He may not say, “I’m going to trust Hashem to keep me from being prideful and arrogant.” No, he has to work on himself and become modest and humble. He has to change his middos by himself. He may not leave it up to Hashem.
Just as he has to keep away from all the things that are dangerous for his health, he has to avoid the things that are dangerous, that impair his ability to earn a living, or that are bad for his middos. Let’s say he is a businessman. He has to be on good terms with his customers, and he should not say, “I don’t care what my customers think of me. Hashem will give me success anyhow.”