There are things in life that does not work out as we had hope for. In most cases, a relationship. Pondering and regretting about it does not even help the situation. In fact it worsens.
Everything that happened, has a reason to it. Whom you know now, and who you knew back then, it's all scripted.
It's not easy letting go of someone you love, but it's easy to spot someone you will click with eventually. So, chin up and cheer up.