Beside far of Allah, expecting good from Him is an act of sublime merit. Abu Hurairah has quoted a Prophetic saying:-
“Hoping for good is also an act of worship of Allah“. (Tirmidhi and Hakim)
In a Hadith-e-Qudsi our blessed Prophet has quoted the Divine words:-
“I am what my bondsman thinks of me, and where he remembers me, there I am with him” (Bukhari and Muslim).
Many merits have been given in the Quran and Hadith for having high hopes from Allah. This implies that one must try to live according to the Divine Commands and when he incuritably commits an error, he should expect of Divine commands, does not care to reform himself, and is driven by worldly and carnal desire and yet expects Divine pardon mercy, he has been castigated in Hadith.
The right way is to try to reform oneself and to balance Allah’s fear and good hopes from Him. Anas has related that “Once our Prophet(may he be eternally blessed) went to a young man who was on his deathbed and asked him ‘how do you feel?’ The young man said, ‘I have much hope from Allah but I also fear for my sins’. The Holy Prophet said, “The believer who has these two ideas simultaneously at such time, Allah fulfills his hopes and grants him security from fear”.(Tirmidhi).