I stepped out on my boyfriend and had an affair with a married man. It made me realize that  I have problems needing to be resolved.
Well at least that came out of it. What issues did you realize you had to resolve?
I have self-esteem issues that gave me an issue with committing to my boyfriend. I need some help.
It's great that you realize you need some help. Cheating on your partner is wrong, and you even did it  with a married man; behaving that way will lead to trouble.
I don't want to cheat on my boyfriend anymore anyway, I just feel like we can't be together due to these issues.
You might be able to save the relationship if you're willing to be honest with him. There is help available if he agrees to give it a try. It will take some work thought.