In The Name of Allaah, The Most Merciful, The Bestower of Mercy
Imaam Ibnul Qayyim [rahimahullaah] said about praiseworthy competition for good deeds and to excel each other: Every competitor competes the other and is happy when joined in it, just as the companions of the Messenger of Allaah [sallal-laahua-alayhi-wasallam] used to compete in good and they were pleased when others joined them; rather they used to encourage one another whilst competing. This is [an act of] seeking to be foremost in [good deeds]. Allaah [The Most High] said: [ ۖ فَاسْتَبِقُوا الْخَيْرَاتِ-So hasten towards all that is good].
Allaah [The Most High] said:
[سَابِقُوا إِلَىٰ مَغْفِرَةٍ مِنْ رَبِّكُمْ وَجَنَّةٍ عَرْضُهَا كَعَرْضِ السَّمَاءِ وَالْأَرْضِ – Race one with another in hastening towards Forgiveness from your Lord (Allah), and towards Paradise, the width whereof is as the width of heaven and earth]. [57:21]
Umar Ibnul Khattaab [radiyallaahu-anhu] used to hasten towards [good deeds to compete] Abu-Bakr [radiyallaahu-anhu], but he never won. [Ref 1]
Umar [radiyallaahu-anahu] said: One day the Messenger of Allah [sallal-laahu-alayhi-wasallam] commanded us to give sadaqah. At that time I had some property, so I said: Today I shall surpass Abu-Bakr if I am to surpass him any day. So I brought half of my property. The Messenger of Allaah [sallal-laahu-alayhi-wasallam] said: What did you leave for your family? I replied: The same amount. Then Abu-Bakr brought all that he had with him. So the Messenger of Allah [sallal-laahu-alayhi-wasallam] said to him: What did you leave for your family? He replied: I left Allah and His Messenger for them. I [Umar] said: I shall never [excel you] in anything. [Ref 2]
[Ref 1: Source: Ar-Rooh of Imaam Ibnul Qayyim 431-432) abridged]
[Ref 2: Abu Dawood and graded Hasan by Sh Albaani’ Hadeeth Number: 1678’ kitaab Az-Zakaah (page: 259)]