sometimes you have to be cruel to be kind. It's really upsetting when you have to hurt someone but it shows that you are a lovely person. Ultimately, you've had to do what's best for you. As much as it hurts him, in the long run you've done him a favour as there is someone out there who will love him in the way that you don't just like there is someone out there for you who you will love.
I heard once that being heartbroken means you loved someone who wasn't right but imagine what it'll be like when you love the person who is right. It'll hurt him now but in the long run, it'll be better for the both of you. At the end of the day, life isn't a dress rehearsal. You've got to give everything a fair whack and be as happy and content as you can