Welcome to the human race.
How do I know what the state of my soul is?
With absolute certainty? You don’t, and you never will. Nobody really does. Saints (Teresa of Avila, for example) are a lot close to that certain knowledge than I am and you are, but even they cannot be absolutely certain of their soul’s worthiness beyond a sliver of a doubt.
But they can be pretty darned confident. And so can we all, unless we have a very good reason to believe – clear knowledge – that there is a mortal sin on our soul since our last confession. To do otherwise would be to presume against God’s mercy.
And, let’s suppose, just for a moment, just for the sake of argument, that you are unknowingly in a state of mortal sin (which seems unlikely at best): to receive the Sacrament while in a state of mortal sin is sacrilege only if the receiver does so knowingly. So there is no way that you can commit a sin by receiving here, even if you are somehow in a state of mortal sin, because you don’t know it. The question should not be, “Am I absolutely positively certain that I am in the state of grace?” The question, especially for a person who has struggled with scruples, should be, “Am I absolutely certain I’m in a state of mortal sin?”
You’re safe. Go receive. Then go get your scrupulosity taken care off. Maybe you’re better than you were before, but the above poster is right: this post is an example of scruples.