It is narrated from the Prophet of Islam (PBUH) who said:
Patience has four branches: Eagerness, fear, piety, and waiting. Whoever is eager for heaven gives up inappropriate/inordinate desires; and whoever fears fire (hellfire), protects himself/herself from Haram. And whoever neglects this world, is not bothered by difficulties; and whoever is waiting for death, hurries to do good deeds [1].
[1] Ma’adanal Jawahir, Page 40.
Source: en.shafaqna.com