Ruling on not fasting for someone who has to take medicine every 12 hours
Question

                I am mentally ill and I went to the doctor, who gave me medicine in the form of pills which I have to take for the next 5 years, one pill every 12 hours. What should I do, especially in the month of Ramadan, as the fasting lasts for 15 hours a day? If I delay taking this medicine, even for less than an hour, I may become sick (epilepsy). Please advise me, may Allah reward you.
Praise be to Allah.
    Allah, may He be glorified and exalted, says (interpretation 
    of the meaning):

    “So keep your duty to Allaah and fear Him as much as you 
    can”

    [al-Taghaabun 64:16]

    If sickness will result from delaying a dose of medicine, 
    there is nothing wrong with not fasting if the day is long, such as fifteen 
    hours as it is nowadays. There is nothing wrong with taking the tablet that 
    has been prescribed and breaking the fast for that reason, and making up the 
    fast later. You should take the tablet and refrain from eating and drinking, 
    and make up the fast, because you broke the fast because of this tablet, and 
    you should refrain from eating and drinking and make up that day later on. 
    But if it is possible to delay it and you will not be harmed by that, then 
    you have to delay it so that you can take it at night. 

    But if you cannot do that, there is no blame on you, and you can make up this day on short days, which are the cold days when the fast is less than 12 hours. End quote. 

    Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him)