Telling husband

I had a sexual affair once with someone who isn’t my husband. I feel like I need to tell him but then I know he will leave. After this I became so much more appreciative of my husband and now don’t take things for granted and show up more in the relationship. My mom said that I shouldn’t tell him and just continue showing up as the better version of me. I don’t want him to leave and know that will worsen my depression if he leaves. However I am beating myself up so much because of what I did. My husband is not interested in a sexual relationship. Do I need to tell him to move on and forgive myself? Is it ok if I choose not to tell him?