On the words "...and shall cause him to be thoroughly healed" (Exodus 21:19), our sages state: "the Torah grants permission to the physician to practice his healing arts" (Talmud, Berachot 60a).

The following are excerpts from a letter written by the Rebbe, of blessed memory, on the subject of listening to the advice of a doctor:

I was distressed to hear that your health has declined and furthermore that you are not careful in following the instructions of the doctor. I heard a number of times from my father-in-law, the Rebbe of blessed memory, that his father had declared: How precious is the body of one of Israel; on it so much was lavished (i.e. the Torah and Mitzvot, which were given exclusively to the soul in the body rather than to the spiritual angels above).

...If The Creator treats the body as something so precious how careful must we be in guarding this divinely precious object entrusted into our safekeeping by the Almighty. The physician practices his healing art with the permission and at the command of the Torah. It is therefore quite certain that even where the doctor's instructions entail temporary curtailment in observance of a Jewish custom etc., the Torah will not "leave the debt unpaid." By temporarily foregoing the observance of this custom for medical reasons, you will surely be enabled, after recovery, to add energy and enthusiasm in your observance of Torah and Mitzvot, and you will fulfill them to a far more intense degree than before, with long and happy years...

NOTE: The above letter deals with the observance of a Jewish custom (minhag, not a Torah-law or mitzvah) by a patient whose sickness was not critical or severe. However, in circumstances where one's life is endangered (or even where the situation might conceivably lead to loss of life or limb) the Torah itself commands us to follow the physician's orders even when they run counter to the observance of mitzvot. If necessary to save a life one must (not "may" but "must") profane the Shabbos, eat non-kosher food, etc.1