Is feeling proud of one’s religion a kind of blameworthy pride?
Question

                Is there anything wrong with a person feeling proud of his religion or feeling proud of a person who does something good? Because we know that pride in the heart is something bad.
Praise be to Allah.
      Firstly: 

    With regard to feeling proud of one’s religion and of 
    belonging to it, this is something that is prescribed in Islam and is a 
    righteous deed. 

    A story from one of the battles illustrates this point: Abu 
    Sufyaan, the leader of Quraysh, expressed pride in his religion and the 
    religion of his people – as he had not yet entered Islam. The Prophet 
    (blessings and peace of Allah be upon him) answered his boast with an 
    expression of the Muslim’s pride in his religion and his affirmation of the 
    Oneness of the Lord of the Worlds.  

    Al-Bukhaari narrated in his Saheeh (3039) from the 
    hadeeth of al-Bara’ ibn ‘Aazib (may Allah be pleased with him) that after 
    the battle Abu Sufyaan ibn Harb started composing rajz verse and saying: 
    “Rise in honour, Hubal; rise in honour Hubal.” 

    The Prophet blessings and peace of Allah be upon him) said: 
    “Why don’t you answer him?”

    They said: “O Messenger of Allah, what should we say?”

    He said: “Say: Allah is Most High and Most Glorious.”

    Abu Sufyaan said: We have al-‘Uzza and you have no ‘Uzza.”

    The Prophet blessings and peace of Allah be upon him) said: 
    “Why don'’t you answer him?”

    They said: “O Messenger of Allah, what should we say?”

    He said: “Say: Allah is our Supporter and you have no 
    supporter!” 

    Allah, may He be exalted, has taught His slaves that true 
    pride and perfect honour can only be achieved by obeying Allah. Allah, may 
    He be exalted, says (interpretation of the meaning):

    “Whosoever desires honour, power and glory then to Allaah 
    belong all honour, power and glory [and one can get honour, power and glory 
    only by obeying and worshipping Allaah (Alone)]. To Him ascend (all) the 
    goodly words, and the righteous deeds exalt it (i.e. the goodly words are 
    not accepted by Allaah unless and until they are followed by good deeds), 
    but those who plot evils, theirs will be severe torment. And the plotting of 
    such will perish”

    [Faatir 35:10]. 

    i.e., and whoever would like to be honoured in this world and 
    the Hereafter, let him adhere to obedience to Allah, then he will attain 
    what he wants, because Allah is the Sovereign of this world and the 
    Hereafter, and all honour, power and glory belong to Him, as He says 
    (interpretation of the meaning):

    “Those who take disbelievers for Awliyaa’ (protectors or 
    helpers or friends) instead of believers, do they seek honour, power and 
    glory with them? Verily, then to Allaah belongs all honour, power and glory”

    [al-Nisa’ 4:139]

    “And let not their speech grieve you (O Muhammad r), for 
    all power and honour belong to Allaah”

    [Yoonus 10:65]

    “But honour, power and glory belong to Allaah, and to His 
    Messenger (Muhammad صلى الله عليه وسلم), 
    and to the believers, but the hypocrites know not”

    [al-Munaafiqoon 63:8]. 

    Mujaahid said: “Whosoever desires honour, power and glory” 
    [al-Faatir 35:10] by worshipping idols, “then to Allaah belong all 
    honour, power and glory. 

    Qataadah said: “Whosoever desires honour, power and glory 
    then to Allaah belong all honour, power and glory” i.e., let him seek 
    honour, power and glory by obeying Allah, may He be glorified and exalted. 

    Tafseer Ibn Katheer, 6/536 

    Secondly: 

    With regard to a person feeling proud of himself, if it is 
    because he is religiously committed, righteous and pious, then it is good, 
    but if it is because of anything else, such as lineage, ancestry, wealth, 
    position or status among people, then this is an act of Jaahiliyyah and is 
    not permissible. 

    Muslim (1550) narrated from Abu Maalik al-Ash‘ari (may Allah 
    be pleased with him) that the Prophet (blessings and peace of Allah be upon 
    him) said: “There are four matters of Jaahiliyyah in my ummah that they will 
    not give up: pride in one’s forefathers, slandering lineages, seeking rain 
    by the stars and wailing (for the dead).”  

    Muslim (5109) also narrated from ‘Iyaad ibn Himaar 
    al-Mujaasha‘i (may Allah be pleased with that) that the Messenger of Allah 
    (sa) said one day in his khutbah: “Allah has revealed to me that you should 
    be humble so that no one will boast to anyone else and no one will 
    transgress against anyone else.” 

    Al-Majd Ibn Tamiyah (may Allah have mercy on him) said: Allah 
    has forbidden on the lips of His Prophet two types of mistreatment of 
    people: pride and transgression against them and scorn. 

    Fayd al-Qadeer, 2/217 

    The guideline with regard to this issue is: whatever is a 
    source of pride and honour because of religion is part of the religion and 
    is praiseworthy; any source of pride other than that is blameworthy. 

    But feeling proud because of doing acts of obedience and 
    worship means feeling happy that one has been enabled to do that and feeling 
    proud of belonging to people who do that, and praising Allah for saving him 
    from shirk and its people, and from sin and its path. 

    As for looking down on the slaves of Allah and feeling that 
    one is above them because of acts of obedience that one has done, this is 
    the worst type of pride and arrogance, and the one who is like this is on 
    the brink of disaster and there is a danger that his deeds will be thrown 
    back at him. 

    And Allah knows best.