Does weeping and shedding tears for the deceased cause him any harm?
Question

Does weeping and shedding tears for the deceased cause him any harm?
Praise be to Allah.It was narrated in more than one hadeeth from the Prophet (peace and blessings of Allah be upon him) that the deceased suffers because of the weeping of his family over him. For example, Muslim narrated in his Saheeh (927) from Ibn ‘Umar that Hafsah wept for ‘Umar, and he said, “Calm down, O my daughter! Do you not know that the Messenger of Allah (peace and blessings of Allah be upon him) said: ‘The deceased suffers because of his family’s weeping over him’?” 
And it was also proven that the Prophet (peace and blessings of Allah be upon him) wept for the deceased on more than one occasion, such as when he wept at the death of his son Ibraaheem, as was narrated by al-Bukhaari (2/105) and Muslim (7/76) from the hadeeth of Anas (may Allah be pleased with him). He (peace and blessings of Allah be upon him) also wept at the death of one of his daughters, whilst she was being buried, as was narrated by al-Bukhaari, 1258 from the hadeeth of Anas (may Allah be pleased with him). 
And he (peace and blessings of Allah be upon him) wept when one of his grandchildren died, as narrated by al-Bukhaari (1284) and Muslim (923), from the hadeeth of Usaamah ibn Zayd (may Allah be pleased with them both). 
If it is asked, how can we reconcile between the hadeeths which forbid weeping for the deceased and those which permit it? 
The answer is: 
The Prophet (peace and blessings of Allah be upon him) explained that in a hadeeth narrated by al-Bukhaari (7377) and Muslim (923) from Usaamah ibn Zayd, according to which the Prophet (peace and blessings of Allah be upon him) wept for the son of one of his daughters. Sa’d ibn ‘Ubaadah said: “What is this, O Messenger of Allah?” He said, “This is compassion which Allah puts in the hearts of His slaves. Allah shows mercy to those of His slaves who are merciful.” 
Al-Nawawi said: 
What this means is that Sa’d thought that all kinds of weeping were haraam, and that shedding tears was haraam. He thought that the Prophet (peace and blessings of Allah be upon him) had forgotten that, so he reminded him. But the Prophet (peace and blessings of Allah be upon him) explained that simply weeping and shedding tears is neither haraam nor makrooh, rather it is compassion and is something good. What is haraam is wailing and lamenting, and weeping that is accompanied by one or both of these actions, as the Prophet (peace and blessings of Allah be upon him) said: “Allah does not punish for tears that are shed or for sorrow in the heart, rather He punishes or shows mercy because of this” – and he pointed to his tongue. 
Shaykh al-Islam Ibn Taymiyah was asked – as it says in al-Fataawa, 24/380 – whether the weeping of a mother or brothers and sisters has any effect on the deceased. He said: “Rather there is no sin in tears shed by the eyes and sorrow in the heart, but lamenting and wailing are forbidden.” 
With regard to weeping for the deceased even after some time has passed, there is nothing wrong with that, so long as it is not accompanied by wailing, lamenting or feeling displeased with the will and decree of Allah. 
Muslim (976) narrated that Abu Hurayrah (may Allah be pleased with him) said: The Prophet (peace and blessings of Allah be upon him) visited the grave of his mother and wept, and those who were around him also wept. He said: “I asked my Lord for permission to pray for forgiveness for her, and He did not give me permission; and I asked Him for permission to visit her grave and He gave me permission. So visit the graves, for they will remind you of death.” 
And Allah knows best.