Narrated Al-Bara' bin 'Azib: The Prophet ﷺ appointed 'Abdullah bin Jubair as the commander of the cavalry archers on the day of the battle of Uhud. Then they returned defeated, and that what is referred to by Allah's Statement:-- "And the Apostle (Muhammad) was in your rear calling you back". (3.153)
This hadith also reminds us to be humble and accept defeat when it comes our way, instead of getting angry or frustrated. We should learn from our mistakes and strive to do better next time by putting more effort into whatever task we are doing. Lastly, this hadith shows us that Allah's mercy is infinite; He will never abandon those who put their trust in Him no matter what happens.