Well, the first question is, how old is your boyfriend? If he is 18 or older, I would advise stopping a relationship with him as it is probably unhealthy.
But if he is 17 or under (or whatever the laws are in your area,) how has your relationship changed after having sex? Have you decided to no longer have sex? Is he okay with this decision? If you regret it and he doesn't agree to stop having sex, he is not a good person for you to be in a relationship with right now.
You might wonder what this has to do with your mom. Since you say you are not close with your mom and she would punish you for this, you may choose to not tell her you have had sex. As long as you feel like you can either A, stop regretting having sex, B, stop having sex and stay with your boyfriend, or C, discontinue your relationship with your boyfriend and there are no health issues, you aren't obligated to let her know.
Is there a reason why you want to tell her? Or do you just want to get it off your chest? Best of luck.