Riyad as-Salihin, Book 7, Hadith 925 (In-Book)

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].

عن ابن عمر رضي الله عنهما أن رسول الله صلى الله عليه وسلم عاد سعد بن عباده ومعه عبد الرحمن بن عوف، وسعد بن أبي وقاص، وعبد الله بن مسعود رضي الله عنهم، فبكي رسول الله صلى الله عليه وسلم ، فلما رأي القوم بكاء رسول الله صلى الله عليه وسلم ، بكوا ؛ فقال‏:‏ “ألا تسمعون‏؟‏ إن الله لا يعذب بدمع العين، ولا بحزن القلب، ولكن بهذا أو يرحم‏ "‏ وأشار إلا لسانه‏" ‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com