كتاب عيادة المريض وتشييع الميت والصلاة عليه وحضور دفنه
6  
The Book of Visiting the Sick
(153)
Chapter: The Ruling of crying and wailing over a Dead Person
(153)
باب جواز البكاء علي الميت بغير ندب ولا نياحة
Riyad as-Salihin 925
Ibn 'Umar (May Allah be pleased with them) reported:
The Messenger of Allah (ﷺ) visited Sa'd bin 'Ubadah during his illness. He was accompanied by 'Abdur-Rahman bin 'Auf, Sa'd bin Abu Waqqas and 'Abdullah bin Mas'ud (May Allah be pleased with them). The Messenger of Allah (ﷺ) began to weep. When his Companions saw this, their tears also started flowing. He (ﷺ) said, "Do you not hear, Allah does not punish for the shedding of tears or the grief of the heart, but punishes or bestows mercy for the utterances of this (and he pointed to his tongue)."

[Al-Bukhari and Muslim].

عن ابن عمر رضي الله عنهما أن رسول الله صلى الله عليه وسلم عاد سعد بن عباده ومعه عبد الرحمن بن عوف، وسعد بن أبي وقاص، وعبد الله بن مسعود رضي الله عنهم، فبكي رسول الله صلى الله عليه وسلم ، فلما رأي القوم بكاء رسول الله صلى الله عليه وسلم ، بكوا ؛ فقال‏:‏ “ألا تسمعون‏؟‏ إن الله لا يعذب بدمع العين، ولا بحزن القلب، ولكن بهذا أو يرحم‏ "‏ وأشار إلا لسانه‏"‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏
Reference : Riyad as-Salihin 925
In-book reference : Book 6, Hadith 32