Qays bin Abu Hazim reported,

We came to visit Khabab during his illness. He had been cauterized, and he said, "Our companions who passed on before us departed without the world diminishing any of their reward, but we have come upon wealth for which we find no place except the dust. Were it not that the Prophet ﷺ forbade us from praying for death, I would have prayed for it."Then we came to him another time, and he was building a wall of his. He said, "A Muslim is rewarded for everything he spends, except for what he puts into this dust."

Azami 3527

Sahih

عن قيس بن أبي حازم قال

دخلنا على خباب نعوده، وقد كيات، فقال: إن أصحابنا الذين سلفوا مضوا ولم تنقصهم اكتوي سبع الدنيا، وإنا أصبنا ما لا نجد له موضعا إلا التراب، ولولا أن النبي ﷺ نهانا أن ندعو بالموت لدعوت به، ثم أتيناه مرة أخرى، وهو يبني حائطا له، فقال: إن المسلم يوجر في كل شيء ينفقه إلا في شيء يجعله في هذا التراب.

الأعظمي 3527صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Dying person
Section
Disliking wishing for death
Numbering
Jami al-Kamil 3527 (2nd edition)
Azami 3527