http://www.islaam.net/
It is permitted to cry or weep, softy, before death, at the time of death, and after the person has died. According to ash-Shâfi‘î, however, it is makrûh to cry after the person has died, but permissible before the soul has departed.
The correct opinion is that crying is permitted both before and after death. The evidence for this is the hadîth narrated by Jâbir ibn ‘Abdullâh (RA) in which he said: “My father died at the battle of Uhud, and I began to weep. The people told me to stop, but the Messenger (SAAS) never asked me to stop. Then my aunt Fâtimah began to weep too, and the Prophet (SAAS) said:
Ibn ‘Abbâs (RA) reported that when Ruqayyah (RA), the daughter of the Prophet (SAAS), died, the women started to cry, and ‘Umar (RA) began to whip them to make them stop. The Prophet (SAAS) told him: “O ‘Umar, leave them alone and let them cry.” To the women he said: “Go ahead and cry, but avoid the crying of the shaytân…Whatever comes from the eye and heart is from Allâh and is a sign of mercy, and whatever comes from your hand and your tongue is from the shaytân.” (Ahmad)
A number of sound ahâdîth describe the Prophet (SAAS) weeping on a number of occasions when someone he loved had died. When the Prophet (SAAS) visited the tomb of his mother he wept, and caused others to weep. When he was burying the martyr ‘Uthmân ibn Madh’un (RA) after Uhud, he kissed him and his tears fell on ‘Uthmân’s face. When he gave the news of the death of Ja’far (RA) and his companions in the battle against the Romans at Mu’tah, he spoke with tears streaming down his face.
Another sound report describes how Abû Bakr (RA) wept when he kissed the Prophet (SAAS) after he had died. The ahâdîth that forbid crying should be interpreted as referring to the kind of crying that is accompanied by eulogizing and wailing.
Abû Mâlik al-Ash‘arî (RA) said: “The Prophet (SAAS) said:
In another hadîth, the Prophet (SAAS) said that if a woman practices the custom of wailing, and does not repent before she dies, on the Day of Resurrection she will be raised with clothes of tar and a shield of scabs. (Muslim)
Abû Mûsâ (RA) said: “The Prophet (SAAS) said:
There is no doubt that wailing and eulogizing are harâm. How could it be otherwise, when they indicate discontent with one’s Lord and contradict patience? Behaving this way harms oneself too, when one slaps one’s face, pulls out one’s hair, prays to Allâh to take one’s soul, wastes possessions by tearing one’s clothes, complains of injustice from Allâh and praises the deceased with qualities that he did not possess. Any of these would be sufficient grounds for the total prohibition of wailing and eulogizing.
Anas (RA) reported that when the Prophet (SAAS) became very ill, he started to lose conciousness. Fâtimah (RA) said, “How great is the distress of my father!” He said, “There will be no more distress for your father after today.” When the Prophet (SAAS) passed away, she said, “O my father who answered the call of his Lord, O my father whose destination is Paradise, O my father, to Jibrîl will tell the news of your death.” After the Prophet (SAAS) had been buried, she said, “O Anas, how could you bear to bury the Prophet and cover him with dust?” (al-Bukhârî)
When his son Ibrâhîm died, the Prophet (SAAS) said, “We are very sad for your death, O Ibrâhîm.”This does not indicate discontent with the decree of Allâh or complaining against Allâh. Such statements are no more than crying or weeping.