Continue to work on you! Try to stop thinking about W and marriage and getting everything to work out (I know easier said than done). Work on you, be a great dad, and see what happens.
I also don't think being a friend with your W is bad if it doesn't negatively affect your emotions/ expectations. Can you truly be just friends with your W? I know this is a question I've been asking myself lately (about my W, not yours ).
Personality is who the world sees, character is who you are