Sometimes we meet soul mates, karmic connections, twin flames in this lifetime because there are things we need to learn and work through. Sometimes we're not meant to be with them in this lifetime, and that reunification is meant for a different lifetime.
As painful as it is, accept the experiences and wisdom learnt with gratitude and then let it go. Focus on your life in the here and now.