Whenever sadness settles within me, I try to mix in some gratitude to ease the pain. If gratitude doesn't work, then it is time to submit to the thought of death and the preparation for it. One prepares by doing what is pleasing to Allah. The remembrance of Allah's might and power is overwhelming. It can calm any hardship at any time.