All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ʻalayhi wa sallam, is His Slave and Messenger.
You should know that judging a Muslim as a disbeliever is a serious matter that should not be taken lightly. One should not hasten to label an act or statement as an act of disbelief except with relevant religious evidence. Ibn ʻUthaymeen wrote in his treatise on Al-Walaa’ wal-Baraa’:
“If such an act, statement, or abandonment of a religious obligation is not proven to be an act of disbelief with a religious text (from the Quran and Sunnah), then it is impermissible for anyone to declare it an act of disbelief because this would constitute saying about Allaah that of which one has no knowledge, while Allaah, The Exalted, says (what means):
· {Say, "My Lord has only forbidden immoralities - what is apparent of them and what is concealed - and sin, and oppression without right, and that you associate with Allaah that for which He has not sent down authority, and that you say about Allaah that which you do not know."} [Quran 7:33]
· {And do not pursue that of which you have no knowledge. Indeed, the hearing, the sight and the heart - about all those [one] will be questioned.} [Quran 17:36]
If it is not proven that this person performs religious obligations, then it is impermissible to declare him a non-Muslim based on mere assumptions; Allaah, The Exalted, says (what means): {And do not pursue that of which you have no knowledge...} [Quran 17:36]Moreover, declaring a Muslim as a non-Muslim leads to deeming shedding the blood of a person whose blood is protected by the sharee'ah allowable (which is a grave and serious matter).” [End of quote]
A mere feeling of satisfaction and relief at the punishment of a Muslim for his crime at the hands of non-Muslims does not constitute an act of disbelief. However, if this Muslim is wrongfully punished for a crime that he has not committed, then rejoicing at his punishment in this case is a kind of sin because feeling content with a sin is considered a sin. Al-Qurtubi wrote, “Acceptance of a sin and being content with it is a sin; this is why the doer of a sin and the one who contentedly accepts it are both punished with the same punishment and both of them are ruined.”
The mere feelings to which you referred in the question are inner thoughts for which the person shall not be held accountable as long as they are mere passing thoughts that have not settled in his heart; otherwise he would be held accountable for them. An-Nawawi wrote:
“According to the consensus of scholars, inner thoughts are pardoned as long as they do not settle and persist. This is because they are beyond one's control and do not appear voluntarily and one has no way of avoiding it. This is what is meant by the hadeeth that reads, 'Allaah forgives my followers their inner thoughts as long as they do not turn them into words or deeds.' Scholars highlighted that it refers to the passing thoughts that do not take root in one’s heart. They underlined that whether such passing thoughts involve backbiting (of the heart, i.e. having evil thoughts about someone), disbelief, or anything else, they are pardoned as long as one does not yield to them, allowing them to take root in his heart. If evil inner thoughts about disbelief (non-deliberately) cross a Muslim person's mind and he hastens to repel them, then he is not declared a disbeliever and bears no sin for it ... Therefore, it is impermissible for the Muslim to indulge in or continue to think of such evil inner thoughts and dwell on them; if one experiences inner thoughts involving backbiting or other sins, then he is obliged to repel them and try to find possible interpretations for them other than their evil apparent meanings.” [Al-Athkaar]
Allaah Knows best.