Hazrat Shaikh Moulana Muhammad Zakariyya (rahmatullahi ‘alaih) once mentioned the following to a certain person:
You wrote to me mentioning that at present, you feel down and unmotivated (to carry out good deeds). There is no need for you to become over-worried, as people’s conditions generally fluctuate between qabdh (feeling unmotivated) and bast (feeling motivated).
In such a condition (where you do not find the motivation and drive to do good deeds), you should increase the amount of istighfaar you generally do. Upon reflection, if you feel that this condition you are experiencing is on account of some sin that you had committed, then you should make istighfaar and taubah, and beg Allah Ta‘ala to forgive you for that specific sin.
In most cases, this condition (of feeling unmotivated) is caused through the sins of the eyes (i.e. not guarding the gaze from haraam, casting lustful glances at women, etc.) and due to the sin of the tongue through engaging in gheebah (backbiting, slandering, etc.). These sins are such that a person himself will know whether he had fallen into these sins or not.
(Qutbul Aqtaab Hazrat Sheikhul Hadith Moulana Muhammad Zakariyya (rahmatullahi ‘alaih) pg. 435)