Abu Bakr told me, and Abu Bakr spoke the truth, that he heard God’s Messenger say, “No man will commit a sin, then get up and purify himself, then pray, then ask God’s foigiveness without God forgiving him.” Then he recited, "And those who, when they do something to be ashamed of, or who wrong themselves, remember God and ask forgiveness for their sins” (Al-Qur’an; 3:135).
Tirmidhi and Ibn Majah transmitted it, but Ibn Majah did not mention the verse.
Buraida told how one morning God’s Messenger called Bilal and said, "What did you do to get to paradise before me? I have never entered paradise without hearing the rustling of your garments in front of me.” He replied, "Messenger of God, I have never called the adhan without praying two rak'as, and no impurity has ever happened to me without my performing ablution on the spot and thinking that I owed God two rak'as.” God’s Messenger said, "It is because of them.”
God’s Messenger used to teach us how to ask God’s guidance about matters just as he used to teach as a sura of the Qur’an, saying: When any of you intends to do something he should pray two rak'as which are not compulsory, then say, “O God, I ask Thy guidance by Thy knowledge, I ask Thee for power by Thy power, and I ask Thee out of Thy great abundance, for Thou hast power and I have none, Thou knowest and I did not, and Thou art the One who is aware of the unseen. O God, if Thou knowest that this matter is good for me regarding my religion, my livelihood, and my future wellbeing (or he said, “my affairs in this world and the next”), ordain it for me and make it easy for me, then bless me in it. But if Thou knowest that this matter is bad for me regarding my religion, my livelihood, and my future wellbeing (or he said, “my affairs in this world and the next”), turn it away from me, turn me away from it, ordain good for me wherever it is, then make me pleased with it.” He said that he should name what he required.