If he takes medicine at night for depression and persistent intrusive thoughts (waswaas), and that causes him to be hungry and thirsty during the day, is it permissible for him not to fast?
Question

I have recently started taking olanzapine and lithium after lengthy treatment and various diagnoses from doctors for depression or persistent intrusive thoughts (waswaas). The problem right now has to do with fasting, because when I take the olanzapine before I go to sleep, as prescribed by the doctor, I feel extremely hungry, with dryness in the mouth, and I have no choice but to break the fast. I read an article by a psychiatrist which said that if lithium is taken with low intake of liquids, even one dose, it will cause problems. Before Ramadan, I used to eat a lot after taking the night dose. I feel guilty when I break the fast, and I do not know whether it is permissible to break the fast, or am I using this as an excuse? The waswaas (intrusive persistent thoughts) come to me saying that Allah will punish me. I am also studying and will have exams during this period, and I am afraid that Allah will punish me with regard to that. Please advise me – may Allah reward you, because I cannot wait. The doctor who is treating me cannot give me a fatwa on such an issue, and I cannot ask him. I want to know the Islamic ruling.
Praise be to Allah.The Ramadan fast is obligatory upon every accountable Muslim who is able to fast.
If a Muslim is unable to fast because of a sickness that will harm him or cause great hardship for him if he does fast, or he needs treatment during the day in Ramadan in the form of pills, liquids and other things that are eaten or drunk, then in his case it is prescribed not to fast, because Allah, may He be exalted, says (interpretation of the meaning):
“and whoever is ill or on a journey - then an equal number of other days. Allah intends for you ease and does not intend for you hardship”
[al-Baqarah 2:185].
The Prophet (blessings and peace of Allah be upon him) said: “Allah loves for His concessions to be followed as He hates to be disobeyed.”
Narrated by Imam Ahmad (5839); classed as saheeh by al-Albaani in Irwaa’ al-Ghaleel (564).
We have previously discussed the nature of the sickness that makes it permissible not to fast, in the answer to question no. 12488.
If you can avoid taking this medicine during the month of Ramadan, without causing harm to yourself or obvious hardship, then you should stop taking it so that you will be able to fast.
But if not taking this medicine will be harmful to you, or will cause you obvious hardship, then you may take it at the beginning of the night, so that it will not affect your fast on the following day.
If you have no alternative but to take it before sleeping, and that will result in extreme hunger and dryness of the mouth during the day, then you should form the intention to fast from the night before, and start your day fasting, then if you fear that you will be harmed or die as a result of that, it will be permissible for you to break the fast by eating or drinking as much as will ward off the harm, then you should refrain from eating and drinking for the rest of the day, and make up that fast later on.
If you do not fear that you will be harmed or die, then it is forbidden for you to break the fast.
Your case is like that of one who experiences severe hunger and thirst because of his work, such as a baker, blacksmith, construction worker and so on.
It says in Kashshaaf al-Qinaa‘ (2/310): Abu Bakr al-Aajurri said: Whoever does physically demanding work, if he fears that he will be harmed by fasting, he may break the fast and make it up later on, if he will be harmed by not doing his work. If he will not be harmed by not doing his work, then he is sinning if he breaks the fast, and he should stop doing his work. Otherwise, if he will be harmed by not doing his work, then he is not sinning if he breaks the fast, because he has an excuse. End quote.
In al-Mawsoo‘ah al-Fiqhiyyah (28/57), it says: The Hanafis said: With regard to a worker who needs to earn his livelihood, such as a baker or harvester, if he knows that he will face harm by doing his work, it is permissible for him to break the fast, but it is haraam for him to break the fast before he encounters hardship. End quote.
In Fataawa al-Lajnah ad-Daa’imah (10/ 233), it says: It is not permissible for one who is accountable not to fast during the day in Ramadan just because he is working.
But if he encounters great hardship that compels him to break the fast during the day, he may break the fast by eating and drinking as much as will ward off hardship, then he should refrain from eating and drinking until sunset, then he may break the fast with the people, and he must make up the day on which he broke the fast. End quote.
The Permanent Committee for Ifta’ was asked about a man who works in a bakery and faces immense thirst and exhaustion whilst working. Is it permissible for him to break the fast?
They replied: It is not permissible for that man to break the fast; rather what he is obliged to do is to fast. The fact that he is baking during the day in Ramadan is not an excuse for not fasting; he must work according to what he is able to do.
End quote from Fataawa al-Lajnah ad-Daa’imah li’l-Buhooth al-‘Ilmiyyah wa’l-Iftaa’ (10/238).
To sum up, you should do what you are able to do, as follows:

Stop taking the medicine altogether in Ramadan
Take it at the beginning of the night
Take it before going to sleep, and put up with the hardship of hunger and thirst during the day, if that will not harm you
If you fear that you may be harmed or die of hunger or thirst, then you may break the fast by eating or drinking enough to ward off death, then you must make up the day later on.

We ask Allah to heal you and grant you well-being.
And Allah knows best.