BI - I don't know how much my words mean to you now, but I think it's important to remember that your heart and mind have always been in the right place throughout this whole journey. You are human and your feelings may have prevented you from achieving exactly what you think you should have exactly as you think you should have, but you are headed in the right direction, and you have been from the start. Keep yourself open to God's will and you will succeed in this. God's will, not yours. You don't know the shape success will take, and you won't recognize it if you keep trying to mold your expectations rather than keep your eyes and ears open to truth.
Everything that has happened up until now is exactly the way it should have happened. You're not expected to be perfect, neither is your marriage - do you think a loving God would have us be married if it took perfection to be successful? Is there anything that can not be forgiven? Make your amends and forgive yourself, then start anew. It's all happening the way it should, the interpretation is left up to you. As you are is how you will see those around you, and how they will be.
Hang in there - this isn't the end of the ride - there are good times ahead!
“No problem can be solved from the same level of consciousness that created it. ” – Albert Einstein