The Messenger of Allah ﷺ said, "Allah has sent down both the disease and the cure, and He has appointed a cure for every disease. So seek treatment, but do not treat yourselves with what is unlawful."
قال رسول الله ﷺ: إن الله عز وجل أنزل الداء والدواء، وجعل لكل داء دواء، فتداووا ولا تداووا بحرام.
Abu Dawud (3874) narrated it from Muhammad bin Ubada Wasiti, who said, Yazid bin Harun told us, Ismail bin Ayyash informed us, from Thalaba bin Muslim, from Abu Imran, from Umm Darda, from Abu Darda, and he mentioned it.Its chain is hasan because of Thalaba bin Muslim, for a group of narrators transmitted from him, and Ibn Hibban mentioned him among the trustworthy narrators. Someone like him has his hadith graded hasan when it has a foundation and he has not brought anything objectionable. Likewise, Abu Imran Ansari is truthful, and Ismail bin Ayyash's hadith is hasan when he narrates from the people of Syria, and this is one of those cases. There has been disagreement over other versions of it, but what I have mentioned here is the soundest of them.