I graduated last year from a prestigious university where I was in general a very good student. I am now applying to graduate programs.
The class (upper-level undergraduate mathematics) had moved to an online format due to the pandemic; the first part of the class was in person. (This was 2 years ago.) The exam in question was closed to all aids, such as peer collaboration, the textbook, notes, and the Internet. Moreover, although the exam was available within a 36-hour window as a PDF file, it was stipulated that it be taken within 2 hours. There was no monitoring for compliance with the self-timing or closed-book requirements. These rules were laid out unambiguously, and I signed a declaration of academic honesty, in which I affirmed, falsely, that I had complied with the rules. I consulted the textbook extensively during the exam and took 6 hours to complete the exam (because I was quite literally studying the material during the exam period). I got away with it.
To be honest, at the time, it did not even occur to me that it was morally wrong to do such a thing. I was under pressure from my other classes and I felt that I did not have time to study beforehand. I made the following rationalizations, mostly subconsciously: (1) it was not particularly wrong since I was not copying answers or looking up solutions, but merely "refreshing my memory" with key theorems; (2) I had performed extremely well before, and I could easily have gotten the same grade if I had studied, so I was not obtaining anything that lay beyond my potential (I got a perfect score on this virtual exam just as I had on an earlier in-person exam of similar difficulty); (3) other students would inevitably break the rules; (4) the lack of enforcement was an implicit signal that they were more idealistic guidelines than rules; (5) my other classes had relaxed the closed-book requirement in light of the virtual format.
The incident has begun to weigh heavily on my conscience out of the blue; I had nearly forgotten about it between now and then. In hindsight, it was profoundly wrong for me to have done it. I feel enormously guilty about this incident and can only think of how foolish it was to have minimized it with those self-deceptions. Needless to say, I have no desire to ever again violate the norms of academic honesty. It may sound implausible, but I don't think I realized that what I had done was cheating, and how big a deal it is, until recently.
What should I do? In light of the severity of the infraction and my prospective plans in academia, is it incorrect to remain without raising the issue publicly, as I have until now?