For example, Imam Sadiq (AS) says in a Hadith that anyone who gives clothes to a poor brother in faith will have an easy death.
In another Hadith, the sixth Imam (AS) said anyone who wants to have Sakarat al-Mawt (agonies of death) eased for him should serve his parents.
According to a Hadith from the Holy Prophet (PBUH), anyone who loves Imam Ali (AS) will have an easy death.
Certainly, loving Imam Ali (AS) will lead to choosing his path and acting upon the teachings of that infallible Imam (AS).
There is also a Hadith according to which when one is dying, he should be taken to a place where he usually says his prayers so that he would have an easy death.