The Messenger of Allah ﷺ said, "The Hour will not come until a man passes by another man's grave and says, 'I wish I were in his place,' not out of any love for meeting Allah ."
حدثنا علي أخبرنا ورقاء عن أبي الزناد عن الأعرج
قال رسول الله ﷺ لا تقوم الساعة حتى يمر الرجل بقبر الرجل فيقول يا ليتني مكانه ما به حب لقاء الله عز وجل
Its chain of transmission is sahih. Bukhari related it in 9/73, in the Book of Tribulations, up to the point "until the people wish they were among the dead", and Muslim in 4/2231, no. 157, and Abdul-Razzaq in 11/378, no. 20793.