Shama-il Tirmidhi Chapter 34, Hadith Number 8 (223).

Ali ibn Rabiah radiyallahu anhu says, I was present when a conveyance (A horse or something) was brought to Hazrat Ali radiyallahu anhu (in the period of his khilafah). He recited Bismillah and put his leg in the stirrup. After he had mounted he said Alhamdulillah and recited this dua:

Translation: Glorified be He Who hath sudued those unto us, and we were not capable (Of subduing them); And lo! Unto our Lord we are returning. (Surah Zukhruf 13-14)

(The ulama say that a conveyance could be a means of death. Therefore subjugation of a conveyance with gratitude towards Allah for His Mercy, and death are mentioned together. After all a person has to return to Allah after death). Ali radiyallahu anhu then said Alhamdulillah three times, Allahu Akbar three times, then recited:

Translation: Glorified be Thou! Behold, I have wronged myself. So forgive thou me. Indeed, non forgiveth sins but Thou.

Then (Sayyidina Ali radiyallahu anhu) laughed (smiled). I said to him, What is the reason for laughing, O Ameerul Mumineen? He replied, Rasoolullah sallallahu alaihe wasallam also recited these duas in this manner and thereafter laughed (smiled). I also inquired from Rasoolullah sallallahu alaihe wasallam the reason for laughing (smiling) as you have asked me. Rasoolullah sallallahu alaihe wasallam said, Allah Taala becomes happy when His servants say, No one can forgive me save You. My servant knows that no one forgives sins besides me.