I think the difference between confidence and cocky is a matter of humility. Its important to be humbly confident I think.
This doesn't seem to relate to what you are talking about however. You aren't confident because he broke trust with you. That is why I think. You thought you had a position of being special in his life, sexually and in terms of your opinion and take on life. His cheating told you that you despensible and not worth as much as you thought to him. Of course you have lost your confidence because of that. Anyone would.
I suggest that you not be so hard on yourself and point out to him that HE has created this in you and now you are left to deal with it. At the same time I would suggest that the two of you use this to work on his never ever cheating on you again.
This coming from a woman that is very confident. Why? Because I have learned some hard lessons about this and am in a place now that means I can be who I am to the best of my ability. Not only that I can offer that to those in my life by staying true to my integrity and word.
Anyone want to be friends on Facebook?
Send me your name via PM