I think you did the right thing. Sounds like you know what you want and what you don't want. If you weren't getting it from him, you shouldn't settle. Sometimes dating someone you've known for so long can be difficult. (speaking from personal experience) And it is hard and it will take time to heal. Don't beat yourself up. Take sometime for you and be gentle to yourself.
I hope things are going better. Many gentle hugs to you.