For a start
you are not the failure in all of this. She failed you when she didn't keep her own boundaries. Secondly, there were lots of reasons your alarm bells were sounding about her and i really think this could be good for you, to find someone better suited to what you need. I think your attachment was keeping you there rather than your belief that she could help you.
Despite all that, i know your heart is hurting right now and i'm sorry for that. Keep writing it out xx