I feel like a failure

My of you saw my post the other day about my fiancé telling a girl about our personal life. We talked and he’s not sure he wants to continue our relationship. To add to that I’ve been diagnosed with unexplained infertility. Am in debt and falling school. He was the best thing to ever happen to me and now I’m losing him. All I hope is that the next person makes him happy but in the mean time I feel like a failure not being able to keep him happy if I would’ve just done a few things different I wouldn’t be losing him and that’s the hard thing to know.