Sayyiduna Zaid (RadhiAllaho anho) narrates:
I heard Rasulullah (Sallallahu Alaihi Wasallam) saying;
If anyone says:
Astaghfir ullah-alladhi la ilaha illa
Huwal-Haiyul-Qayyumu, wa atubu ilaihi
(I seek forgiveness of Allah besides Whom there is non worthy of worship,
the Ever-Living, the Self-Subsisting, and I turn to Him in repentance)
his sins will be forgiven
even if he should have run away from the battlefield.
(while he was engaged in fighting for the Cause of Allah)
In another narration, these words are to be repeated three times.
[Abu Dawud, At-Tirmidhi and Al-Hakim]