something pleased him, he would say, “All praise belongs to Allah; by His favor righteous deeds are perfected,” and when the opposite occurred he would say, “All praise belongs to Allah in every circumstance.” Such was the guidance of the Prophet (peace and blessings be upon him).
As for the wording that some people use—al-ḥamdu lillāh alladhī lā yuḥmadu ʿalā makrūh siwāh (“Praise be to Allah; none besides Him is praised for what is disliked”)—this phrase ought not to be uttered, for the clause “for what is disliked” betrays your aversion to the matter and contains a trace of impatience. Instead, say as the Prophet (peace be upon him) said: “All praise belongs to Allah in every circumstance.”
There is no doubt that, in this world, a person will have days that gladden him and days that do not; this life is never constant, nor is it untainted—its very clarity is mixed with cloudiness. We ask Allah to allot for us and for you, through it, a share of the Hereafter. Therefore, when something delights you, say, “All praise belongs to Allah; by His favor righteous deeds are perfected,” and when something distresses you, say, “All praise belongs to Allah in every circumstance.”
The man then went out and declared, “Tonight I shall certainly give charity.” His donation fell into the hand of an adulteress—a prostitute who made herself available for fornication. The next morning the people were saying, “Last night he gave charity to an adulteress!”—something neither sound reason nor innate nature would readily accept. Yet he said, “All praise belongs to Allah.”
He then said, “I will most certainly give charity tonight,” feeling as though his first and second alms had not been accepted. He gave again, and this time the charity reached a wealthy man—someone who is not entitled to alms, but rather to gifts and the like. The following morning the people were saying, “He gave charity last night to a rich man!” And he said, “All praise belongs to Allah.”