He is being treated for addiction and finds it difficult to do the prayers and fast
Question

I was previously addicted to drugs, and I committed all kinds of sins, such as not praying, and so on. I am currently in the stage of recovery and repentance to Allah, may He be exalted, but it is difficult for me to do my religious duties and also focus on recovery from addiction at the same time. Please note that I take psychiatric medication, but I am trying hard to make myself pray, so long as I am not sleeping. But if I sleep and miss the prayer, I do not pray it, so that I do not burden myself with more than I can bear. But I am aware that this is a sin, but I am taking it step-by-step to do my religious obligations, so that I do not give up and drift away, and go back to my old ways. But – praise be to Allah – now, I pray so long as I hear the adhan, even though I do not always pray in the mosque. But I strive to make myself do the prayers, and at the same time I am aware of my shortcomings. The only reason I am striving to do that is because I tried to repent many times before, but I repent and do everything (of religious duties) once, then I find it difficult and I go back to my old ways. But this time, I started gradually, meaning that first of all I started to pray when I was not sleeping, and I am trying hard to do the prayers in the mosque. My intention is that if I do this action (prayer) perfectly and get used to it, then I will start to do the next action, and so on. My question is: is it permissible for me to take religious practice step-by-step, if it is difficult for me to do what Islam tells me to do all at once? Is it permissible to pray at home, noting that I am unwell, and I always pray Fajr in congregation, but it is difficult for me to pray Zuhr? Is it okay if I do not fast, because I have to take my medicine or it is too difficult for me to fast, and so on? What must I do as an addict during the recovery period, and as someone who used not to pray, then began taking it step-by-step to do religious duties, so that I do not burden myself with that which I cannot bear?
Praise be to Allah.Firstly:
We praise Allah, may He be exalted, for guiding you and enabling you to repent, and we ask Him to help you and grant you a full recovery.
Secondly:
You must do what you are able to of religious duties, and you will be excused – in sha Allah – with regard to what you are unable to do or what is definitely too difficult and is more than you can bear, according to your situation.
Your praying in the mosque is something that is required according to Islamic teachings, and it is also part of your recovery, because mixing with people and good people will have a beneficial impact, in sha Allah.
If you sleep and miss Zuhr, or it is too difficult for you to go out to pray in the mosque, then you may pray at home or when you wake up, because of the report narrated by Muslim (684) from Anas ibn Maalik, who said: The Prophet of Allah (blessings and peace of Allah be upon him) said: “Whoever forgets a prayer or sleeps and misses it, his expiation is to offer that prayer when he remembers it.”
Thirdly:
Fasting is an important obligation which it is not permissible to omit except when one has an excuse. If you will be harmed by delaying taking your medicine until after iftar, this is an excuse which makes it permissible for you not to fast, because Allah, may He be exalted, says (interpretation of the meaning):
{O you who have believed, decreed upon you is fasting as it was decreed upon those before you that you may become righteous.
 [Fasting for] a limited number of days. So whoever among you is ill or on a journey [during them] - then an equal number of days [are to be made up]} [Al-Baqarah 2:183-184].
If you will not be harmed by delaying taking your medicine until after iftar, then you must fast.
If you will face hardship and find it too difficult to carry on fasting during the day, even though you are physically healthy – meaning that you are not feeling any symptoms of sickness, not even a headache, for example – then you must intend to fast from the night before, then if you start finding it too difficult to carry on and you become certain that it is beyond your capability to continue fasting, and you fear that you may be harmed by severe thirst, then you may drink, then you must refrain from eating and drinking for the rest of the day, and make up that day later on.
It says in Fatawa al-Lajnah ad-Da’imah (10/233): It is not permissible for the accountable person not to fast during the day in Ramadan just because he is working.
But during the day, if he faces extreme hardship and realises that he has no choice but to break the fast during the day, he may do so by eating or drinking that which will ward off the hardship, then he should refrain from eating and drinking until sunset and break the fast with the people, and he must make up that day on which he broke the fast. End quote.
But if you are suffering from illness, such as a severe headache, this makes it permissible to not fast.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said: There are several different scenarios with regard to the sick person and fasting.
1.. He will not be affected by fasting, such as if he has a mild cold, a mild headache or a toothache and the like. In this case, it is not permissible for him not to fast, even though the scholars say that it is permissible for him not to fast because of the general meaning of the verse (interpretation of the meaning): {and whoever is ill} [al-Baqarah 2:185].
But we say: If this ruling is connected to a scenario in which breaking the fast will ease the hardship for him, then in that case we say that he may break the fast. But if the sick person will not be affected by fasting, then it is not permissible for him not to fast, and he is obliged to fast.
2.. If it is difficult for him to fast (because of his sickness), but it will not harm him, then in this case it is disliked (makruh) for him to fast, and it is Sunnah for him to not fast.
3.. If it is difficult for him to fast and it will harm him, such as a man who is suffering from kidney disease, diabetes or the like, then in that case fasting is prohibited for him."(Ash-Sharh al-Mumti‘  6/341).
We advise you to offer a great deal of supplication and beseech Allah, may He be exalted, to accept your repentance and grant you good health. Strive to offer supplication at the times when a response is likely.
We ask Allah to comfort you, make things easy for you and accept your repentance.
And Allah knows best.