When your expectation or that of the world do not match we call it a failure. A child beginning to walk falls after every step and then finally masters the art of walking. Would you call the falling a failure? Are you struggling to walk today and did you fall? Falling prepares you to walk miles at a later date.
Which great man has not fallen before he succeeded? Your life is made up of a lot of events, some of them are failures. Failure in a relationship does not make you a failure. Continue to learn, change and keep going. Do not stop. It is only when you stop then it becomes a failure.