Is it permissible to drink Khamr (intoxicant) as a cure for illness?

Question 7: Someone drinks Khamr (intoxicants) and commits Zinaa (sexual intercourse outside marriage) but they perform Salaah (Prayer) and the other fundamental deeds of Islaam; is the `Ibaadah (worship) they perform considered valid?

Answer: Whoever drinks Khamr, commits Zinaa, or indulges in any sin while considering it Halaal (lawful); is regarded as a Kaafir (disbeliever) whose good deeds are rendered invalid. On the other hand, if that person commits sins because the weakness of their souls overcomes them but they… read more here.