Take it one day and one night at a time. Fill your days and nights with activities that you enjoy and that nurture you. Buy yourself some flowers to brighten up your room or delve into a left behind project that perhaps you ignored when in the relationship.
Perhaps stop thinking of it as a failure also. Maybe during the time you were together, it was perfect for you both. And maybe now it is perfect to go on and find what new adventures life has in store for you. The only failure, I think, would be in not learning from this and filling your days with regret.
Focus on what you like in life each day. Each time the regret thought comes, flick the switch in your brain and make yourself think of something happier. Perhaps even say "I release you to your higher good as I go on to my own" and know that a relationship does not have to last forever to be a success in many ways. No relationship lasts forever anyway in the physical realm.
Know that you are a complete person in and of yourself whether you are in a relationship or not.