Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) said: The Messenger of Allah (peace and blessings be upon him) went out with Sayyiduna Abd al-Rahman bin Awf (may Allah be pleased with him) to the date-palms, while his (peace and blessings be upon him) son Ibrahim was surrendering his soul to Allah. He (peace and blessings be upon him) placed him in his lap, and his (peace and blessings be upon him) eyes began to flow. Sayyiduna Abd al-Rahman bin Awf (may Allah be pleased with him) said: You (peace and blessings be upon him) forbid people, yet you yourself are weeping! He (peace and blessings be upon him) said: "I did not forbid weeping; rather, I forbid wailing and making sounds like fools, the sounds that wicked people make: with songs, with idle amusement and play, and with the tunes of Satan; and, at the time of calamity, the sound that comes with scratching the face and tearing the collar. This weeping is mercy, and whoever does not show mercy is not shown mercy. O Ibrahim! Were it not that this is the truth and a true promise, and that everyone who comes later will join those who went before, we would grieve far more than the grief we feel at being parted from you. The eyes are weeping and the heart is grieved, and we will not say anything that angers our Lord."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7151