Yes, God certainly did know what He was doing when He commanded us to take our marriage vows seriously, and not flee at the first sign of trouble. Jesus said, "Therefore what God has joined together, let man not separate" (Mark 10:9).
Why does God take marriage so seriously? One reason is because He loves us and wants what is best for us - and He knows that casually walking away from our marriage is never best. Admittedly every marriage has its problems, but it's far better to face them and work through them than to end up in divorce court. This isn't always possible, I know, but I am convinced that with God's help most marriages can be saved.
The alternative - as you've discovered - is often a bitter harvest of anger, loneliness, feelings of failure, financial strain, fear of the future, depression and so on - the list is almost endless. Perhaps your letter will encourage someone who is struggling in their marriage to stay with it, and in time find the joy that God intended for them to have.
You can't change the past, but you can change the future - and the way to start is to turn to Christ and open your heart to Him. He wants to forgive the past, and He wants to guide your future. Begin again today by giving your life to Jesus Christ.