Inwardly:
1. Patience,
2. Submission to the Divine Will,
3. Reflection on the fleetingness of live,
4. Taking admonition for one’s own situation.
Shaddad ibn Aws reported that the Prophet (Allah bless him and give him peace) said, “The intelligent is one who controls his lower self and works for that which comes after death. The stupid is one who follows his caprice and vainly hopes that his desires will be fulfilled by Allah.” [al-Tirmidhi, Sunan]
Abu Hurayra reported that the Messenger of Allah (Allah bless him and give him peace) said, “Race to good deeds! What do you await but delayed poverty, overbearing wealth, debilitating illness, senility, unexpected death or the Dajjal? Or are you waiting for unseen evil, or the Final Hour? And the Final Hour will be bitter indeed and terrible.” [ibid]
Outwardly:
1. Making sure the dead person’s estate is correctly divided according to the Shariah AFTER all debts have been cleared.
2. If the person is expected to have missed fard fasts or prayers, their family (or friends) should make expiatory payments (fidya) to compensate for this, according to the rules of fiqh. [Can be explained upon request.]
3. Reciting a lot of Qur’an oneself (and family and friends) and donating the reward to the deceased. One may not pay Qur’an reciters for this; it would be sinful and without reward.
4. Making a lot of dua for them.
There is agreement among the 4 Sunni schools that one may donate the reward of some or all one’s actions to some or all believers, living or dead. [Ibn al-Humam, Fath al-Qadir]
Malik ibn Rabi’a al-Sa`idi said, “Once as we sat with the Messenger of Allah (Allah bless him and give him peace), a man from the Bani Salama came and asked, ‘O Messenger of Allah, is there any goodness I can show my parents after they die?’ He said, ‘Yes . Praying for them, seeking forgiveness for them, fulfilling the pledges they made, keeping ties with their relatives, and honouring their friends.” [Abu Dawud, Sunan]
Finally, we should learn the manners and ways of the Prophet (Allah bless him & give him peace) and live them:
Sayyiduna Abu Hurayra reported that the Messenger of Allah (upon him be blessing & peace) said, “My entire community will enter Janna except those who refuse.”
He was asked, “O Messenger of Allah, who are those who refuse?
He said, “Those who obey me will enter the Garden and those who disobey me refuse.” [al-Bukhari, Sahih]