From The Eyes Mislead (#198) by Rabbi Avigdor Miller
Our faith is easy to maintain because it’s never challenged. Certainly it’s easy to believe in Olam Haba (the World to Come) when there's nothing to contradict you. But when the evidence of your eyes shows death, someone whom you knew warmly, who was active, is now stretched out lifeless, it’s difficult to believe that it’s not true.
This is only his overcoat that the person took off. He himself left his overcoat in the lobby and checked it in, and he went now into the banquet hall to enjoy the happiness that is prepared for him. But it’s extremely difficult if you’ll keep your eyes on the overcoat.
Just before you finally succumb, now you take the last medicine
And that’s why the gemara in Brachos, “haro’eh sheyitzro misgaber alav — when a man sees a man sees that his evil inclination is getting the better of him,” sometimes it becomes an emergency, what should you do? Sometimes the situation is such that you just feel you're slipping, it’s an emergency.
The gemara gives a number of stratagems: you should say Krias Shma; you should do this, if it doesn’t help, do that. Finally the gemara says if nothing helps, “yazkir lo yom hamavess” you should remind yourself of the day of death.
Just before you finally succumb, now you take the last medicine, and you think about what you’ll be like after you leave this world. You’ll be lying a lifeless lump and now you're going to be carted away and put into the soil. If you can think further, understand that the soil is not going to be your asylum, because straight from there you're going before the great tribunal and that’s even worse than being left in the soil. “V’al tomar shehashe’ol beis manos lach — Don’t think that the grave is going to be an asylum for you,” you won't hide in the grave, that’s even worse.
Think about the last day, think how you’ll feel when you're about to leave this world and you look back and you see how sorry I am that I yielded, how foolish I was to give in to momentary inclinations. Why didn’t I think that this whole life is only transitory, and I’m going to leave it after a while like everybody else. Why did I commit this crime against Hashem?
So imagine, think about that “yazkir lo yom hamovess” that’s the brake, the emergency brake.