Long post, rambling, sorry.

Me and my girlfriend have been dating for a year. Without going into too much detail, she was insecure about a girl that I was interested in immediately prior to our relationship. I did nothing with this girl, but I did pursue her. I cut it off as soon as I starting dating my current girlfriend. 

Fast forward - the girl I knew prior has been a constant point of insecurity throughout the relationship, and led my girlfriend to interrogating me and threatening to cheat on me because she believed I was cheating on her or lying to her about my previous interactions with this girl. I did not. I continuously asked her to stop mentioning this other girl as she means nothing to me.

We have been on and off, and she has threatened to cheat on me and sleep with other men multiple times. She will block me, get on a dating app, tell me to talk to the other girl (who I've had no interaction with), and threaten to sleep with other men. Two of these times, I listened to her, and reached out to the other girl. There was no flirting, no cheating, no nothing, but I reached out to spite my girlfriend. My girlfriend did not cheat either she only tried to hurt me.

Both of these times, my girlfriend took me back for overreacting. I omitted the fact that I reached out, because I knew if she would leave me for doing nothing at all, she would definitely leave me for reaching out. I have never cheated. But I lied to her. She asked me if I reached out, and I continued to lie. I knew if I told the truth, she would leave me. A year later, she found out that I reached out to this other girl. I told her I only did it because she constantly threatened to cheat on me, and continuously  told me to reach out to this girl. I would have not done it otherwise. I tell her that she pushed me. I have spoken twice (when she threatens to cheat on me and gets on dating apps). No flirting occured, and the conversation lasted less than 10 minutes. There was no continuing contact. But I hid this from my girlfriend, even after she asked me if I spoke to anyone over our 1-3 day long on/off breakups. 

Now she is leaving me because I lied to her face for a year. I have not cheated. But I didn't tell her I reached out because I wanted to keep her in my life. I blame her for constantly threatening to cheat, and constantly telling me to talk to this other girl. But I lied, and she will never trust me again. I have no idea what to do, and I don't know if this is salvageable. She says she would rather I cheated than lied to her face. I feel like it shouldn't be the end of our relationship because I didn't cheat at all. But I broke her trust by lying to her face over and over again.