I really relate to some of the points you made. I built my identity around A) being her lover and B) being a family man (we have two young children). I left because of her mental health and her escalating rage.
Im on my own now. Moved out about 3 weeks ago. Its not her that i miss and i know that. Its the past her I miss. Its the idea of her. And the idea of my perfect family. It baffles me how I can know that she was a danger to me and i fell out of love with her before I moved and simultaneously think my life is incomplete without her. I'm aware that I'm being an idiot but none the less I continue to be an idiot. (I don't really think im an idiot or dislike myself, just couldn't think of how else to word it lol)
I discussed this at length with my therapist. Here's what he suggested i do. Write down all the small things that made us incompatible and read them when i start to romanticize her. He said not to put major or traumatic events, no need to bring those things up any and every time i miss her. I have "she was a vegetarian and I am not. I hated having to worry about planning and cooking two different dinners every day" and "she liked bright, colorful decorations and I preferred darker wood tones. Now my furniture is how I want it".
Its been helping me and reminds me that she wasn't "the one". If she was my list wouldn't be so long. Give it a shot.