You are not a failure, it just sounds like this relationship wasnt right for you. How does that make YOU a failure? (clue - it doesnt..)
I am sorry that you are hating being single - if being with a partner is really important to you, i can see how it would be a really hard situation. I spent a few years being really lonely (but no more so than i was when i was married!) but then i decided to start revelling in my singledom and use it to help me learn new things, do the projects, work, study, fun things that i wanted to do. I learnt that single is just a 'state', i that i can choose how i see i want to feel about it.
It may be right that every relationship you have ever HAD ended up like this. But it doesnt mean that every relationship you may go on to have in the future will.