The heart in Arabic means qalb which is a thing that fluctuates, the heart is a fluctuating thing, sometimes your imaan will be high, sometimes it will be low and this is normal and it will have an affect on your motivation so just consistently offer dua that your heart remains firm on this deen, this is one of the most important duas to offer. There is a hadith:
a man amongst you may do good deeds till there is only a cubit between him and Paradise and then what has been written for him decides his behavior and he starts doing (evil) deeds characteristic of the people of the (Hell) Fire. And similarly, a man amongst you may do (evil) deeds till there is only a cubit between him and the (Hell) Fire, and then what has been written for him decides his behavior, and he starts doing deeds characteristic of the people of Paradise." Narrated by Al-Bukhari.
The dua is: yaa muqalibal qulub thaabit qalbi a'la deenik
oh changer of hearts, keep my heart firm on your religion
for the heart is between the two fingers of ar-rahman (the merciful)