Hopefully you can make positive changes to your behavior quicker than most that arrive here since you have been exposed to this before.
Drop any/all unattractive behaviors. Start adding attractive behaviors.
Do your research into attractive male behavior. Do not be supplicating. Do not be open with her about your emotional state. Project that life is amazing now. You can express your sadness or anger or whatever you are feeling here, and in private, when and where it is safe.
Agree with her that the relation sucked (by your behavior when interacting with her).
two of my mantras:
1) I do not share my woman with other men (or women). 2) I do not want to be with a woman who does not want to be with me.
Enthusiastically support her. Do not argue with her. Actively listen to her...IE relate to her emotional state when she is talking to you. "You sound sad"...or "I bet that mad you mad" etc
Be on purpose. Do not be boring.
"What is best for my kids is best for me" Amor Fati Link to quotes: https://www.divorcebusting.com/forums/ubbthreads.php?ubb=showflat&Number=2879712