Abu Musa Al-Ash'ari (May Allah be pleased with him) reported:
The Messenger of Allah (ﷺ) said, "When a man's child dies, Allah, the Exalted, asks His angels, 'Have you taken out the life of the child of My slave?' and they reply in the affirmative. He (SWT) then asks, 'Have you taken the fruit of his heart?' and they reply in the affirmative. Thereupon He asks, 'What did my slave say?' They say: 'He praised You and said: Inna lillahi wa inna ilaihi raji'un (We belong to Allah and to Him we shall return).' Allah says: 'Build a house for my slave in Jannah and name it Baitul-Hamd (the House of Praise)."'[At-Tirmidhi].
App reference: Book 7, Hadith 29
Arabic/English book reference: Book 7, Hadith 922