Therapy, introspection, learn how to be single again, and be there for the kids. They should not suffer for their parent's mistakes. And if you are a person of faith, study, practice, and live by it, but don't go in deep. Life needs balance.
Finally, surround yourself with good people if possible.