The following Hadith tells of the Prophet Muhammad’s response to the death of a grandchild. His first message to the boy’s mother, on hearing of his serious condition, seems to counsel a firm stoicism, which would explain the surprise in his followers at the Prophet’s tears of compassion. Earlier posts of Hadith can be found here, here, and here.
It is said that the Prophet’s daughter sent a message to him saying that a son of hers was dying and asking him to come to them. He sent her a greeting, saying at the same time, “What God has taken belongs to Him, what He has given belongs to Him, and He has an appointed time for everyone, so let her show endurance and seek her reward from God.”
She then sent a message, imploring him to come to her. So he came with several of his Companions.
The boy, who was on the point to death, was lifted up to God’s Messenger, whose eyes overflowed with tears. One of the Companions said, “What is this, Messenger of God?”
He replied, “This is compassion, which God has placed in the heart of His servants. God shows compassion to those of His servants who are compassionate.”