Patience --> Paradise (Ahadith 1039 - 1042)

Volume 2, Book 23, Number 340:
Narrated Anas:
The Prophet said, "A Muslim whose three children die before the age of puberty will be granted Paradise by Allah due to his mercy for them."
This encourages patience on the death of children. Don't get wrong ideas.
Volume 2, Book 23, Number 341:
Narrated Abu Sa'id:
The women requested the Prophet, "Please fix a day for us." So the Prophet preached to them and said, "A woman whose three children died would be screened from the Hell Fire by them," Hearing that, a woman asked, "If two died?" The Prophet replied, "Even two (would screen her from the (Hell) Fire. "And Abu Huraira added, "Those children should be below the age of puberty."
Patience is the main factor. Number doesn't matter.
Volume 2, Book 23, Number 342:
Narrated Abu Huraira:
The Prophet said, "No Muslim whose three children died will go to the Fire except for Allah's oath (i.e. everyone has to pass over the bridge above the lake of fire)."
Volume 2, Book 23, Number 343:
Narrated Anas bin Malik:
The Prophet passed by a woman who was sitting and weeping beside a grave and said to her, "Fear Allah and be patient."
In other narrations, we get to know that this woman was not just weeping, she was wailing and doing the ritualistic mourning (which is discouraged in Islam). So Prophet (SAW) asked her to be patient.
Does being patient mean we can't cry on someone's death? Does it mean we can't be sad? Absolutely not. We CAN cry and we CAN be sad. BUT, we should look at the way Prophet (SAW) mourned his children's deaths. He lost almost all his children during his lifetime. Did he ever utter words of ungratefulness or let the sadness overtake him? What did he do?
Narrated by Anas bin Malik :
We went with Allah’s Apostle (pbuh) to the blacksmith Abu Saif, and he was the husband of the wet-nurse of Ibrahim (the son of the Prophet).
Allah’s Apostle took Ibrahim and kissed him and smelled him and later we entered Abu Saif’s house and at that time Ibrahim was in his last breaths, and the eyes of Allah’s Apostle (pbuh) started shedding tears.
‘Abdur Rahman bin ‘Auf said, “O Allah’s Apostle, even you are weeping!”
He said, “O Ibn ‘Auf, this is mercy.”
Then he wept more and said, “The eyes are shedding tears and the heart is grieved, and we will not say except what pleases our Lord, O Ibrahim ! Indeed we are grieved by your separation.”
(Sahih Bukhari, Book #23, Hadith #390)
Read more on the death of Prophet (SAW)'s son here and here.