Has it ever occurred to you that your prayer really should be one of thanksgiving, thanking God that you didn't marry this person? If you had married him, I strongly suspect you'd be regretting it by now. Why do you still wish you were together, although (as you say) it doesn't make any sense?
I don't know the reason; our emotions don't always make sense, do they? But I do know this: Down inside each of us is a yearning to be loved -- to have someone love us and accept us just as we are. And there's nothing wrong with that; this is the way God made us.
The problem is that our yearning to be loved easily leads us astray, and we seek love in wrong ways or with the wrong person. And even when we realize this, we don't necessarily turn away but convince ourselves that happiness must be just around the corner. But we're only deceiving ourselves.
As the Bible says, "The heart is deceitful above all things and beyond cure. Who can understand it?" (Jeremiah 17:9).My prayer is that you will turn to the only One who truly loves you -- and whose love will never fail. That One is Jesus Christ, who loves you so much that He gave His life for you. By faith open your heart to Him -- and then ask Him to guide you into His perfect plan for your life.