Sorry you're hurting. It does sound like it's for the best, though.
Consider it a learning experience -- and a blessing that it didn't drag on for several years rather than the short time you actually had. As you move forward, keep in mind what signs to look out for in your own behavior so that you can speak up sooner and more directly to advocate for yourself in relationships. I would also be aware of when you're getting so attached to someone that soon and find ways to step back a bit to see the present situation beyond that attachment. Always ask yourself: 1.) Do I feel respected? 2.) Do I feel valued? 3.) Do I feel heard? and 4.) Has this become more work and pain than joy and fun?