You feel devalued because he didn’t value you. You say you had problems due to his behavior throughout the relationship. It’s his bad character to hurt you by ending it this way. He has issues and is a self centered and immature man.
I hope you will be happier moving forward without him.