No, absolutely not. You didn’t fail if you helped her get to the place she needed to be. It’s wonderful that you helped her, but you also need to think of yourself. It’s not selfish to think of your own happiness and of your own well being. If it harms you to be friends with her, then you need to distance yourself from the situation. She is not your responsibility and friendship is supposed to be a two way street.
You’ve done all you can for her now and that’s all you can do. Please do not be so hard on yourself.