Hi, please answer me these questions clearly. I am dying to know what the answer is. I learned that a person needs to be in "State of Grace" to do good deeds, therefore receive rewards in heaven. But if a person is in mortal sin, their good deeds are not merited because of the mortal sin.
Ok, now here is my question with an example: What if you "think" you are in state of grace? But in reality you don't know having a tattoo is a sin. Would you be rewarded for those good deeds while you "thought" you were in state of grace?
Good deeds while in a state of mortal sin do not count towards heaven, but can count towards the grace of repentence (bringing one to the necessary state to remove oneself from a condition of being in mortal sin.
As to whether one has a sin or not, if one is uncertain then one has an obligation to determine whether they have a sin or not. As long as one is legitimately seeking the answer to that with a real willingness and eagerness to accept the answer, whatever it is, one is not in a state of mortal sin. But if one wonders and puts off or avoids or resists any attempt an obtaining an answer to resolve the question, then the sin, however serious it turns out to be, remains in place.
Good deeds done while seeking to resolve any doubts are counted towards heaven; good deeds done while avoiding an answer to such doubts runs a risk of not being counted towards heaven (but only towards one's own repentance) as one does not know the seriousness of what occasions their doubt. (You could get lucky and it is not a sin at all, or only a venial sin, but such "gambling" with the state of one's soul is wildly dangerous.) Avoid repeating the doubted thing while seeking an answer, unless it includes an apparent necessity, for example employment where you suspect they may be expecting you to do something mortally wrong, but you don't want to leave something as hard to find as a job without being certain that it is wrong.