CateM, I have a similar situation with an ex. When we were together, it was amazing and I thought I had found "the one". Unfortunately, he cheated. I forgave him, he cheated again, and we did that cycle a couple of times. Finally I had enough and we ended the relationship. Fast forward a couple of years where I refused any and all contact from him to finally me realizing being angry was only hurting myself. I decided to let go of the pain and hurt and let him back into my life under certain conditions with boundaries. I missed him...he was someone I really loved and he was my best friend when we were together before and I missed being able to talk to him. He got married after we broke up so we are strictly friends. When we do see each other, he is sweet, kind, funny and wonderful. Yes, he turns into the person I fell in love with the first time. He will text and tell me how wonderful I am...how beautiful...how he misses me and the kids...the whole gamut. If he had a chance, he would want to be together again. Would it work?...absolutely not. Because I know deep in my heart, that no matter how wonderful and awesome he can be, I will never be able to trust him again. I've come to accept that this is just the way he is...always wanting what he doesn't have. It doesn't make him a bad person, but it does make him a better friend than a lover.
So, instead of trying to understand this guy (because you will drive yourself crazy trying), just accept that this is who he is. You can't change him. Then decide if you would ever be able to trust him fully again. If the answer is no, don't get back together because there is no such thing as love without trust. Maybe you could still be friends and be in each other's lives, but make sure you set up clear boundaries and stick with them.