Hadithcore
Mishkat al-Masabih, 2286

‘Abdallah b. ‘Umar told that the Prophet (ﷺ) used to say, “Everything has a polish, and the polish for hearts is rememberance of God. Nothing is more calculated to resuce from God’s punishment than remembrance of God.” He was asked whether this did not apply also to <i>jihad</i> in God’s path, and said, “Not even if one should ply his sword till it is broken.” Baihaqi transmitted it in [<i>Kitab</i>] <i>ad-Da'awat al-kabir</i>.

وَعَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَنَّهُ كَانَ يَقُولُ: «لِكُلِّ شَيْءٍ صِقَالَةٌ وَصِقَالَةُ الْقُلُوبِ ذِكْرُ اللَّهِ وَمَا مِنْ شَيْءٍ أَنْجَى مِنْ عَذَابِ اللَّهِ مِنْ ذِكْرِ اللَّهِ» قَالُوا: وَلَا الْجِهَادُ فِي سَبِيلِ اللَّهِ؟ قَالَ: «وَلَا أَنْ يَضْرِبَ بِسَيْفِهِ حَتَّى يَنْقَطِعَ» . رَوَاهُ الْبَيْهَقِيُّ فِي الدَّعَوَاتِ الْكَبِيرِ

References1 variant
In-Book Reference
Book 9, Hadith 60