It takes courage to deal with feelings of guilt after cheating. It's better done though, than not, as letting the feeling fester can be toxic to a relationship or even to just yourself. There are five steps that need to be taken, and they don't always happen in a certain order:
1) Accept what happened. Even before you can forgive yourself or be forgiven by another, you have to just admit to yourself what you did. If you're feeling guilty, it's because you know that in the end there's no rationalization or justification for what you did.
2) Talk to someone. Confess to a spiritual mentor or a professional counselor. Have someone objective help you navigate these emotional waters.
3) Forgive yourself. Hopefully, your partner forgives you too, but whether or not they stay or go after infidelity, you still have to live with yourself.
4) Learn from the mistake. Analyze what happened, and identify the things that motivated or triggered the cheating. Know how to avoid them in the future.
5) Consider telling your partner. Many people believe that telling their partner is the right call, as healthy relationships are honest and open. In other cases, some believe that marriages are more likely to last if the infidelity is never brought up. It's a tough decision, but in cases where STDs may be spread, or a child might be from a different parent, then the other person in the relationship deserves to know all the facts.