The Messenger of Allah ﷺ said, "Allah has sent down both the disease and the cure, and He has made a cure for every disease. So seek treatment, but do not seek treatment with what is forbidden."
حدثنا محمد بن عبادة الواسطي حدثنا يزيد بن هارون أخبرنا إسمعيل بن عياش عن ثعلبة بن مسلم عن أبي عمران الأنصاري عن أم الدرداء
قال رسول الله ﷺ إن الله أنزل الداء والدواء وجعل لكل داء دواء فتداووا ولا تداووا بحرام
[Its isnad is daif] Bayhaqi narrated it, 5/10, from the hadith of Abu Dawud through the same chain, and Ibn Mulaqqin graded it sahih in Tuhfat al-Muhtaj, hadith no. 2847. Ismail bin Ayyash transmitted using the ambiguous "an" formula, and Thalaba bin Muslim is mastur (of unknown reliability). Part of the hadith has a sahih corroborating witness mentioned earlier, hadith no. 3855, see the previous hadith.