I heard the Messenger of Allah ﷺ say, "Allah says, 'My true servant is the one who remembers Me while facing his opponent,'" meaning at the moment of combat.
حدثنا أبو الوليد الدمشقي أحمد بن عبد الرحمن بن بكار حدثنا الوليد بن مسلم حدثنا عفير بن معدان أنه سمع أبا دوس اليحصبي يحدث عن ابن عائذ اليحصبي
سمعت رسول الله ﷺ يقول إن الله عز وجل يقول إن عبدي كل عبدي الذي يذكرني وهو ملاق قرنه يعني عند القتال
No references are available.
[Its chain of transmission is daif] Ibn Abu Asim also narrated it in Al-Ahad wal-Mathani, 5/151, no. 2689, through the hadith of Walid bin Muslim, by the same route. Ufayr is daif, and Abu Daws is majhul al-hal (unknown status). It also has another route that is obscure.