Answering these questions requires that you be honest with yourself - not always the easiest thing to do, especially if it means admitting you’re a heartless jerk.
If you’re genuinely sorry for your behavior, find a way to apologize to the person you hurt. More than likely, they won’t forgive you right away. But when the dust settles, and it always does, you’re much better off making a genuine attempt to apologize than exacerbating the issue by keeping your mouth shut after breaking someone’s heart in a million pieces. Even if they never forgive you and refuse to speak to you ever again, at least you know you tried to apologize which might make you feel better about the whole crappy situation... which brings me to my next point...
Doing something bad doesn’t necessarily make you a bad person. Consistently doing bad things is a different story, but a few moments of indiscretion followed by regret are a good indication that 1) you’re human and 2) you have a conscience. Both good things.
Don’t do it again
This tip seems pretty obvious, but it has to be said. You now fully understand the catastrophic impact of infidelity and will choose partners that are more appropriate for you. If you want a long term committed relationship, cheating won’t even be an option. If monogamy isn’t your thing, then make sure your partner is aware of your intentions. If you truly recognize your mistake, you will figure out a way to avoid this situation in the future.