Muwatta Imam Malik Book of Burials, Hadith 54
Yahya related to me from Malik from Abu'z Zinad from al-Araj from Abu Hurayra that the Messenger of Allah ﷺ said, "The Hour will not come until a man passes by the grave of another and says, 'If only I were in his place.' "
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ أَبِي الزِّنَادِ، عَنِ الأَعْرَجِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ ﷺ قَالَ : " لاَ تَقُومُ السَّاعَةُ حَتَّى يَمُرَّ الرَّجُلُ بِقَبْرِ الرَّجُلِ فَيَقُولُ يَا لَيْتَنِي مَكَانَهُ " .