I realize it's very challenging when you are in a break-up period to think without emotion about what is going on. It's natural, with the hormones and fears and chaos, to be caught in the whirlwind. It's OK to give yourself time to go through the stages of grief.
I think it's good to keep, in a small corner of your mind somewhere, that life is a long cycle, and that it is natural for these ups and downs to happen. Life is never smooth. Life is always chaos. It is how life is meant to be.
All of these changes and turns and twists help to direct us to our final destination. It is rarely what we think it will be! It is often far more glorious. By moving through and past today we can reach our better tomorrow.
In my experience, I've had a divorce and many break-ups. Each time there were pains and traumas involved. It is never easy. However, I can honestly say that, on reflection, each relationship both taught me something and was an important step towards my future path. I am glad I had each relationship - and I also understand that it was clearly not "the right one". If it had been, it would have worked.
It can be easy to think "well if only" - but again life is full of chaos. That one "if only" you are thinking about is outweighed by the other hundreds of "but also this could have happened" which would have made things even worse. It's good to count your blessings that things went as reasonably well as they did, and that you had something to learn and grow from the experience. Draw those lessons, tenderly appreciate the experience, and then look forward to the wondrous new opportunities that will now unfold.