I like that you are trying to be her friend. It is precisely when we behave in ways that are not deserving of friendship that true friends are revealed. One day your wife will see this. No matter what happens for your romantic relationship, you are parents together so you will always be linked. In a sense, you have the rest of your life to show her and for her to see the friendship you are offering.
Thank you for sharing your friend's words. They are nice to read and a great boost.