When the Prophet ﷺ wished to bid farewell to an army, he would say, "I entrust to Allah your religion, your trust, and the final outcomes of your deeds."
حدثنا الحسن بن علي حدثنا يحيى بن إسحق السيلحيني حدثنا حماد بن سلمة عن أبي جعفر الخطمي عن محمد بن كعب
كان النبي ﷺ إذا أراد أن يستودع الجيش قال أستودع الله دينكم وأمانتكم وخواتيم أعمالكم
No references are available.
Its isnad is sahih. Nasai narrated it in Amal al-Yawm wal-Layla, no. 507, from the hadith of Hammad bin Salama, and Nawawi graded it sahih in Riyad al-Saliheen, no. 716 (my edition).