Death can be a very difficult thing to handle. But with the right reminders, perspective and people, it can be dealt with inshaAllah.
It is natural to feel sad and devastated at the death of a loved one, and that means that it can be hard to help someone feeling sad because of that.
But we have to remember that this world is nothing compared to the next world. This world is only a few years whilst the next world is infinite in time. The Prophet said 'the world is a prison for the believer'. This world has so many pains, sorrows, suffering, toil, sweat, blood, depression, disappointment and so on. But in jannah, there's none of that. It is complete happiness and bliss. So we should be happy to leave this prison and escape to the next world where we can inshaAllah be with Allah swt.
Now the thing we should ask ourselves is 'how can we help the dead person so that s/he can go jannah? Because you know the past is the past, we can't change that, but we can change the future. So we see from the hadiths and Ulema that there are many things we can do.
The Prophet said, may peace and blessings be upon him: 'Were it not for the living the dead would have been doomed'
And he said, may blessings and peace be upon him: 'My Nation is a nation covered with mercy. Its members enter their graves with sins like unto the mountains, and leave their graves having been forgiven because the living have asked forgiveness for the dead.'
And he said: 'A dead (person) in his grave is never more comforted than when those that he loved in the world pay him a visit.' (all the three hadiths above are from Imam Haddad)
He also said, “Read Ya Sin for your dead” (Ibn Majah)
And that indicates the importance of reciting the Qur’an for the dead and that it benefits them, since they get the reward of it insha’Allah.
The scholars say that the below Hadith does not include all the ways of benefitting the dead, and that other hadiths indicate other ways of benefitting, it seems like Allah swt informed the Prophet of other ways of benefitting the deceased or that it is the actions of the deceased that stop except 3, after death and that a person can still donate rewards:
"When a human being dies, all of his deeds are terminated except for three types: an ongoing sadaqah, a knowledge from which others benefit, and a righteous child who makes du'a for him." (Muslim)
Yet it shows the importance of the three things above and that we can utilise them to benefit the deceased. For example if you’re the child of the deceased, then you should try to implement the good things the deceased taught you, and should make du’a for him/her. Or if you establish a thing that leads to sadaqa jariya (so continuous good deeds, like making a Mosque or hospital), then ask Allah swt to give the reward of that to the deceased.
In fact, in a Hadith in Bukhari, the Prophet planted two green stalks on two graves so that the plants would remember Allah swt, and thus the deceased would have their punishment lightened.
We should remember that we have not completely lost the connection with the deceased, because they get informed about what we are doing. So they get happy when they see us do good deeds, and they become sad when they see us do bad deeds.
Sa’id b. Jubayr (d. 95/714) is reported to have stated : “ It is for sure that the dead people are informed about the people who are alive. There is nobody whose relative(s) passed away and who is left uninformed about the relatives he leaves behind. If the news they receive is good, they become happy and if it is not, they become upset.” Abu’d Darda (d. 32/652), from the Honored Companions, used to pray like this : “O Allah, I take refuge in you from a deed which may make my dead relatives feel ashamed of” (Hasan al-'Idwi)
We can do umra, we can recite Qur’an, dhikr (remembrance of Allah swt), selawat on the Prophet, give sadaqa, teach and spread Islamic knowledge, make a well, and so on, and ask Allah swt to give the reward to the deceased and that the reward is presented to him/her in the best of forms. Try to organise gatherings of good deeds, like gatherings of the Qur’an, as that leads to the reward from many and can insha’Allah be donated to the deceased. So that will insha’Allah make the deceased happy at us, and we should try to do this regularly as it helps maintains our connection with our deceased relatives.
In fact, scholars have mentioned (based on different hadiths) that:
‘Verily the souls of the Muslims visit their homes on the eve of every Friday. They stand at the door and announce in a very sad voice, O My Family! O My Children! O My Elders! Be generous towards us with Sadaqa. Remember us. Do not forget us. Be Compassionate towards us in our poverty.’ (Dastoorul Quz’zat)
Thus our lives should consider how that relationship works. Do we want to please or displease the deceased? We should do more good deeds, and avoid the bad deeds. After all, think of yourself in their position, what would you want from the living? This is especially when we know how serious the punishment of the grave is.
Friends should also try to support the family of the deceased, like reminding them of the right perspectives, so they get their mind off thinking negatively and don't constantly miss the deceased. These friends are a part in the quickening the healing process, especially when the friend is religious and reminds the family of the deceased about the virtues of going to Allah swt and how its better than this world, and what can be done to help the deceased.
The Prophet said:
“There is no Muslim who consuls his brother upon a calamity except Allah will cloth him garments of honour on the day of judgement.” (Ibn Majah)
Lastly remember to have patience and hope in Allah swt, even in this difficult time, and this means that the reward is great.
The Messenger of Allah said, "Allah Almighty says, 'The Garden will be the reward for My believing slave when I take his close friend from the people of this world and he hopes for the Garden as his reward." [al-Bukhari]
And if it means that the existing relatives have to maintain the family more harder than before, or take over the duties of the dead relatives, like looking after the children, then know that this is another way of drawing closer to Allah swt, earning good deeds, and even benefitting the deceased. No one says its going to be easy, life is a struggle, but with patience, the right frame of mind, turning to Allah swt, then insha'Allah you will succeed.
The Prophet (sallallahu alaihi wa sallam) answered it beautifully in the Hadith:
Abu Usayd Malik ibn Rabi'a as-Sa'idi said, "Once while we were sitting with the Messenger of Allah, may Allah bless him and grant him peace, a man from the Banu Salama came up and asked, 'O Messenger of Allah, is there any devotion to my parents which I can show them after their death?' He said, 'Yes, praying for them, asking forgiveness for them, fulfilling their pledges after them, maintaining ties with relations which are only maintained through them, and honouring any friend of theirs." [Abu Dawud]
A good article on the topic is: