We've been divorced with no-contact for 3 years, but I still relive my life with her every day. Rehashing old arguments, remembering the way she mistreated me.
We were together for 7 years (in my 30s, now I'm early 40s), and that period changed me more than any other time in my life, including 2 years that I spent in the military deployed to a warzone.
...
How do I become a functional human again? How do I have hope for my future?
It's not easy, but I think some sort of radical acceptance would help. This relationship happened. It's over now. Move on.
But also realize that this does not and should not impact who you are. This person and their problems are their own; you didn't cause their problems. You tried your best to help them, but ultimately you could not, and fortunately they moved on without dragging you down for the rest of your life.
Good for you for not having children with her. Consider it a win that she is out of your life and you do not have to pay her child support for years, and continue to interact with this toxic person, constantly worrying about the impact she's having on your own children.
In a way, you are born again, and have the rest of your life to make what you will from it, with the knowledge you have gained about BPD and these sort of high-conflict people and how to deal with them.
When I first learned about BPD, after reaching out for advice on a different message board and relating some long anecdotes about what I was going through, and the things my then-wife was saying and doing, I remember a poster saying to me like "Consider yourself fortunate that you realized this as soon as you did. I was married for fourteen years."
At the time we had only been married for ~3 1/2 years (we lasted two more). It didn't seem like much consolation at the time to know that someone else had suffered longer than I did, but looking at the 7 years that have gone by now since I moved out and filed for divorce, I am thankful that I've been single and able to do and experience things I wouldn't have been able to do if I had stayed married. I've been able to see and spend time with my family more often; BPDxw was always picking quarrels and fights and ruining family visits for me. And I've been able to reconnect with old friends, and take up a couple hobbies.
It's not ideal; I still have to coparent with BPDxw & pay child support to her, but that will end eventually. Hopefully your divorce settlement was fairly cut and dry and you didn't do badly out of it.
If you have trouble moving on, on your own, I do think you should consider some sort of therapy and talking these things out with someone. And while doing that, also force yourself to do healthy things on your own time: more exercise. get a hobby. read. etc. Don't allow your mind to fall into negative thoughts. We can be our own worst enemies sometimes... I have to remind myself of this as well.