Our Gemara on Amud Aleph makes an assertion that a person is much more likely to tell the truth when he is on his deathbed. When faced with imminent death, a person realizes what is truly important. A close colleague who was fighting terminal cancer told me that he was no longer afraid of people's opinions or bothered by small things. How true that was, and yet such focus and awareness of truth does not come often without such "gifts."
The Gemara in Shabbos (153a) expands on a Mishna in Avos (2:10):
תְּנַן הָתָם, רַבִּי אֱלִיעֶזֶר אוֹמֵר: שׁוּב יוֹם אֶחָד לִפְנֵי מִיתָתֶךָ. שָׁאֲלוּ תַּלְמִידָיו אֶת רַבִּי אֱלִיעֶזֶר: וְכׇי אָדָם יוֹדֵעַ אֵיזֶהוּ יוֹם יָמוּת? אָמַר לָהֶן: וְכׇל שֶׁכֵּן, יָשׁוּב הַיּוֹם, שֶׁמָּא יָמוּת לְמָחָר, וְנִמְצָא כׇּל יָמָיו בִּתְשׁוּבָה.
We learned there in a mishna that Rabbi Eliezer says: Repent one day before your death. Rabbi Eliezer’s students asked him: But does a person know the day on which he will die? He said to them: All the more so this is a good piece of advice, and one should repent today lest he die tomorrow; and by following this advice one will spend his entire life in a state of repentance.
There is still a textual anomaly that the Gemara does not address fully. Why use the language of, “Repent one day before you die”? Rabbi Eliezer's point is well taken that you don’t know which day you will die and that is why what you must repent every day, but why did the teaching utilize this wording? Why not just say “Always repent”, or even, “Repent every day”? Rav Tzaddok (Peri Tzaddik Toldos 9:1) answers that one should repent literally “One day before death”, meaning to say, that the repentance shouldn’t be motivated merely by the fear of facing God and his judgment. Rather, it should be a repentance that comes from a wish to do what is right intrinsically. So that one is repenting on the day before one dies, and in a certain sense, an ordinary day, and not a deathbed day.
We like to forget that we will die. Psychologically, we probably need to forget that we will die so as not to be overcome with despair. However, as I get older and feel mortality and resent it, I also know it is a great gift. The more scarce a resource becomes, the more it is valued. So too with time. If we had thousands of years to live, we would be tempted to waste a lot of time. The Gemara in Sotah (46b) tells of a legendary city whose inhabitants were immortal. The only time people would die was when an elder, who became sick and tired of life, would exit past the city walls to allow the Angel of Death to get him. Living forever takes away a sense of living.
The first page of the Talmud, Berachos 2a, discusses how even though one can recite the evening Shema all night long, the rabbis imposed a restriction that it must be recited by midnight. The reason for this is, "In order to distance a person from transgression, as if one believes that he has until dawn to perform the mitzvah, he might be negligent and postpone it until the opportunity to perform the mitzvah has passed." Isn't that odd? If we are worried that the person will forget Shema, we give him less time? Shouldn't we give him MORE time? Rather, it must be a given in human nature; the more time you give a person, the more he procrastinates and delays.
I don't think it is an accident that this idea appears on the first page of the Talmud. The message is, if not now, when?