To the extent that what you've described is cheating, it was the wrong thing to do. However, whether what you've described is, in fact, cheating in the first place isn't entirely clear. Moreover, as with most moral questions, beyond being simply a matter of right vs. wrong, this is a matter of degree.
Was this cheating at all? As you tell it, you had no intention to cheat. Does one need to intend to cheat to do so? Perhaps not, but the phrase "accidentally cheating" in your question's title strikes me as a contradiction, which suggests that there may need to be some premeditation required for an act to be one of cheating.
You elaborate on what happened with your tutor in some of your comments to other answers:
I always explained my thought process with each problem and only used my answers (even if they were wrong) ...
If I was wrong, the tutor would show me where I went wrong to help me learn.
Presuming you didn't change your submitted answers after the tutor pointed out where you went wrong, your answers would appear to be entirely your own. To me, this indicates no cheating was involved.
But again, even if this was cheating, it was limited in its effect. If this was a midterm or final exam worth a significant portion (e.g., >30%) of your total course grade, that would be one thing, but it sounds like that isn't the case. You mention neither this nor "any other following exam" had practice versions, suggesting more than one followed the one in question, and I think we can safely assume you didn't make this mistake again for any of those.
In other words, you sought help by having someone explain why your own answers on a single exam were incorrect. (Frankly, I'm unconvinced that even rises to the level of transgression, but...) Recognizing you may have made an error, you avoided doing so in the future. And your error, if it was one, likely had a relatively small effect on your overall course grade. So if this was cheating at all, it was to such a limited degree as to be almost trivial.
As a fellow human, my conclusion is that your apparently profound regret about this matter is enough to serve as both penalty and deterrent. As a professor who has seen some questionable exams, as well as dealt with confirmed, blatant, bad faith instances of cheating, my assessment of what you describe is that it's a minor infraction.
So to answer your question about confessing to the professor: if this is an infraction at all, it's minor enough that, were I your professor, I would prefer never to know about it or have to address it. Given its limited significance in the overall course, not to mention your ongoing regret being its own punishment, I wouldn't see this as needing an institutional response. (And given the amount of paperwork those responses require, I'd be more upset about dealing with the bureaucracy of it all than I would have been with what you did in the first place.) Ultimately, I'd suggest that having confessed to the Internet, you can leave your professor out of it, give yourself a break for being a conscientious student doing the best they could during a global pandemic, and work on forgiving yourself, while of course allowing the experience to guide your conscience and future actions.