One who has survived a life-threatening situation is adjured to bring a Korban Todah, thanksgiving offering. Rashi cites Tehillim 107 which is used by Chazal as the source for requiring a Korban Todah from a Jew who finds himself in any of four types of situations: He has been liberated from prison, has recently recovered from a serious illness, he returned from a sea voyage, or traveled in the desert and has arrived safely. In each of these cases, he is to express his gratitude to Hashem with a specific korban.
In Tehillim 50:23 the pasuk states, hbbscfh vsu, jcuz, “He who offers a thanksgiving offering, honors Me” . The word hbbscfh is spelled with an extra “nun,” which Chazal suggest teaches us to give kavod, honor/gratitude, twice to Hashem. What is the reason for this double expression of gratitude? The Kesav Sofer explains that one must thank Hashem not only for his salvation from peril, but also for originally being placed in grave danger. “Whatever Hashem does is for the good” is a noted dictum of Chazal. “As one blesses with joy for the good (situation), likewise he should bless Him for the bad” is a halacha. This, states the Kesav Sofer, is Dovid HaMelech’s intention when he says, “I bless Hashem at all times” (Tehillim 34:2). Consequently, one who offers a Korban Todah expresses two forms of gratitude: he thanks Hashem for rescuing him from grave peril, and he acknowledges Hashem’s beneficence in “availing” him the “opportunity” to move closer to Him via prayer and repentance by placing him in the dire situation which he has survived. For this reason, Dovid HaMelech uses a double “nun” to express the two forms of praise to Hashem for the good and for the bad.
Why specifically are these four situations singled out as being examples for which a Korban Todah is a requisite? Horav Yosef Chaim, z.l., of Baghdad in his Ben Ish Chai, suggests that one who survives these experiences is more apt to delude himself that it was someone or something other than Hashem who/which was the source of his salvation. For example, one who is ill will invariably attribute his having been healed to the intervention of good doctors who applied their skills and used the latest medical techniques on his behalf. One who was incarcerated figures that he was liberated through the mediation and spirited efforts of others who had his best interests at heart. One who traveled through a desert will assure himself that he had taken adequate measures to safeguard his journey. Likewise, one who traveled across the sea will be confident that he had provided for himself the safest means possible of voyaging. In all these cases one might not come to acknowledge the real source of his salvation. Accordingly, he must emphasize his sense of appreciation to Hashem, the Supreme Benefactor.
Indeed, the definition of hakoras hatov, gratitude/appreciation, is the ability to acknowledge/recognize, (hakoras), the good, (hatov). One must concede recognition of the great kindness of his Benefactor. Indeed, if we delve into the source of all the wonderful things that happen to us, we will certainly confront the truth that they all come from Hashem.