I recommend a three-pronged "attack" to your personal road to perdition1-like journey:
1. Don't do anything sudden
This one is nicely covered in several other answers and comments here. It is not likely the system is equipped for this, and blurting out admissions without planning could trigger all kinds of permanently damaging things you and your family do not deserve.
That you have posted a question here in Stack Exchange to help think this through shows that you may already recognize this possibility, so kudos to you!
2. If you are like me, you may feel things that were not done right or correctly should eventually be corrected when possible.
Other answers indicate that one way to "make things right" from your own perspective and feelings 2 would be to find a way to retake or re-audit the class. That may be impossible right now, but go ahead and find out what the processes might be and make a plan to do it as some point in the future.
Make an effort to find out all your options along these lines, and do it in such a way (via emails with dates) that it is documented and your intentions are clear. That's the beginning of your...
3. Cleanup in Aisle 7
In my answer to a somewhat different circumstance What should I do if I did someone else's homework a few years ago? I wrote
Times are different. This is the age of the internet, and "The internet’s not written in pencil... it’s written in ink."3
You don't know where your future will take you. I can speak from personal experience that turmoil, confusion, depression, "bad places" we go mentally generally get better over time, and in future years and decades you may be supporting yourself and your family in a position with some visibility.
You might even end up in a situation where they do background checks or there's competition for a competitive position, or eve running for political office some day, perhaps at a local level or beyond.
If you have made some "atonement" or efforts4 to deal with the situation by retaking or re-auditing, or at least exploring those possibilities in a documented way via emails, or even taken a similar class later; basically taken some action, then when you follow others' good advice here and put it behind you (i.e. focus on the future, deal with present responsibilities of job and family) you can then
- put your worries here aside and focus on all the new worries and challenges that life keeps putting in front of us
- but know that if this somehow ever comes up again, you can demonstrate that this bothered you and you took what actions were available for atonement while simultaneously not putting your responsibilities towards your family at risk. You chose a course of action that was reasonable, reasoned, recognizant, and responsible.
- did not engage in "scandal cover-up behavior" that could cause trouble later4
- 1Tom Hanks says no-one ever talks about his favorite movie Road to Perdition Wikipedia, IMDB
- 2 or if some day this ever finds its way back to you during a background check for a future job or by some bad-intentioned individual
- 3 Erica Albright quote from The Social Network
- 4 While the twelve step process does not apply here directly, they do contain some elements - feelings of guilt and/or regret do haunt us sometimes and cause trouble later. A summary of steps #8 and #9 would be that we should try to make some effort to fix stuff, except when the fix could cause even more problems for others (in this case your family) or you. In those cases, letting "sleeping dogs lie" is recognized as the most compassionate and correct course of action.
- 5 for an extreme example of "trouble later" see: Washington Post's June 15, 2019 Echoes of Biden’s 1987 plagiarism scandal continue to reverberate and Wikipedia Joe Biden 1988 presidential campaign Had he taken remedial action at the time in a way that could be pointed to after the fact, it would have been better.