The Prophet ﷺ said, "Were it not that I would cause hardship to my community, I would never stay behind from any military expedition. But they cannot find mounts, nor can I find anything to mount them upon, and it grieves them to remain behind without me. I would dearly love to be killed in the path of Allah, then brought back to life, then killed, then brought back to life, then killed," repeating it three times.
أخبرنا عبيد الله بن سعيد قال حدثنا يحيى يعني ابن سعيد القطان عن يحيى يعني ابن سعيد الأنصاري قال حدثني ذكوان أبو صالح
عن النبي ﷺ قال لولا أن أشق على أمتي لم أتخلف عن سرية ولكن لا يجدون حمولة ولا أجد ما أحملهم عليه ويشق عليهم أن يتخلفوا عني ولوددت أني قتلت في سبيل الله ثم أحييت ثم قتلت ثم أحييت ثم قتلت ثلاثا
Bukhari narrated it in the Book of Jihad, chapter on stipends and mounts for those going forth in the path [of Allah], hadith no. 2972, from the hadith of Qattan. Muslim narrated it in the Book of Leadership, chapter on the merit of jihad and going forth in the path of Allah, hadith no. 106/1876, from Yahya, the hadith of Yahya Ansari, through him. It is also found in Kubra, hadith no. 4359.