Accepted good deeds...
Accepted good deeds, whether of Muslims or otherwise, have certain afflictions which may come about afterwards and corrupt them. At the head of all of these afflictions is rejection, obstinacy, and deliberate unbelief.
Thus, if non-Muslim individuals perform a great amount of good deeds with the intention of seeking nearness to God, but when the truths of Islām are presented to them show bias and obstinacy and set aside fairness and truth-seeking, all of those good deeds are null and void, “like ashes caught in a strong wind on a stormy day.” Muslims and all other true monotheists, if they commit indecencies and transgressions and betray the practical aspect of the Divine program, are deserving of long punishments in barzakh and the Day of Judgement, and occasionally because of some sins, like intentionally murdering an innocent believer, may remain in eternal punishment.
The good deeds of individuals who don’t believe in God and the Day of Judgement and perhaps may ascribe partners to God will cause their punishment to be lessened and, occasionally, be lifted. Felicity and perdition are in accordance with actual and creational conditions, not conventional and man-made conditions.
The verses and traditions that indicate that God accepts good deeds do not look solely to the action-related goodness of actions; in Islām’s view, an action becomes good and worthy when it possesses goodness from two aspects: action-related, and actor-related.
The verses and traditions that indicate that the actions of those who deny Prophethood or Imāmate are not acceptable are with a view to denial out of obstinacy and bias; however, denial that is merely a lack of confession out of incapacity (quŝūr) – rather than out of culpability (taqŝīr) – is not what the verses and traditions are about. In the view of the Qur’ān, such deniers are considered musta°`af (powerless) and murjawn li’amr illah (those whose affair is referred to God’s command).
In the view of the Islāmic sages such as Avicenna (Ibn Sīnā) and Mullāh Ŝadrā , the majority of people who haven’t confessed to the truth are incapable and excusable rather than culpable; if such people do not know God they will not be punished – though they will also not go to Heaven – and if they believe in God and the Resurrection and perform pure good deeds with the intention of seeking nearness to God, they will receive the recompense for their good deeds.
Only those will face perdition who are culpable, not those who are incapable.