There are many hadith which encourage the Muslims to seek medical treatment.
Usamah ibn Shuraik narrated: “I came to the Prophet, peace be upon him, and found him with his companions. They were calm and serene as if there were birds over their heads. I greeted them and sat down. Then some bedouins came from various places. They askezhim: ‘O Allah’s Messenger! Should we seek medical treatment for our illnesses?’ He replied: ‘Yes, you should seek medical treatment, because Allah, the Exalted, has let no disease exist without providing for its cure, except for one ailment, namely, old age’.” (Reported by Ahmad and the six sunnan. Tirmizhi considers it a sound hadith.)
Anas ibn Mas’ud reported that the Prophet, peace be upon him, said: “Verily, Allah has not let any malady occur without providing its remedy.
Therefore seek medical treatment for your illnesses.” (Nasa’i, Ibn Majah, and al-Hakim.)
Jabir narrated that the Messenger of Allah, peace be upon him, said: “There is a cure for every disease. Whenever an illness is treated with its right remedy, it will, by Allah’s permission, be cured.” (Muslim)