Does Islam give importance to mood changes, such as when one is sick and is not in a good mood and is unable to give the same love, care, devotion and importance to Salah or any other form of prayer?

Salah (Prayers)Mood
Does Islam give importance to mood changes, such as when one is sick and is not in a good mood and is unable to give the same love, care, devotion and importance to Salah or any other form of prayer?
Sayyed Muhammad Husaini Ragheb, Sayyed Muhammad Husaini Ragheb has a BA in Law from Guilan University, Iran and has also undertaken Hawzah studies in Qom. He used to be a Cultural Affairs director of Ethics Group of Al-Mustafa... Answered 6 years ago

Hadith n. 312

312. Amir al-mu'minin, peace be upon him, said: Sometimes the hearts move forward and sometimes they move backward. When they move forward get them to perform the optionals (as well), but when they move backward keep them confined to obligatories only.

312. وقال علی عليه السلام : إِنَّ لِلْقُلُوبِ إقْبَالاً وَإِدْبَاراً فَإِذَا أَقْبَلَتْ فَاحْمِلُوهَا عَلَى النَّوَافِلِ، وَإذَا أَدْبَرَتْ فَاقْتَصِرُوا بِهَا عَلَى الْفَرَائِضِ.

https://www.al-islam.org/nahjul-balagha-part-2-letters-and-sayings/selections-sayings-and-preaching-amir-al-muminin-ali