I don't need to tell my ex anything I haven't already said. For the sake of the prompt I would repeat myself to him and direcly say:
-Thank you so much for doing what you did. Although it was a little scandalous...you truly made my life better than ever. Right now, I couldn't be happier. I tried everything and did everything I could to make you happy but the truth is, I wasn't happy myself and I'm glad you were able to see that. I know you knew. If it wasn't for you, I would be miserable. You saw that I wasn't strong enough and you were barely strong enough but you managed to do it. Everything happens for a reason and I'm excited that we're both happy with our lives now.
Although I can say bad things like "You don't deserve to be happy and you'll never find someone like me", I truly want him to be happy. It's true that he won't find anyone like me but that's his loss and my gain. Maybe once in a while he can regret letting me go and some of the stupid things he did but overall, I am happy with what happened and it was for the best!