You seem to have a serious issue with scruples. No one can accidentally commit a mortal sin, where you lose sanctifying grace. That’s Moral Theology 101.
Now, one could accidentally do something that is grave matter. So, for instance, I see a $100 bill on a table. Mistakenly thinking it’s mine, I take it. But it’s actually someone else’s. Once you realize your mistake, you’re required to make restitution.
Your mistake above, however, is not something that requires restitution other than simply correcting the mistake going forward.
Grave matter is different from mortal sin, which destroys sanctifying grace. One can never accidentally lose the grace of God and commit a mortal sin. For mortal sin, you have to know that it’s grave matter, realize what you’re doing while you’re doing it, and intend to do it anyway.