First, he removed the public stigma. Those of you who haven't sinned, you throw the first stone. One by one, starting with the eldest, her accusers lay down their stones and left. God has not rejected you for what you have done. This is not the unforgivable sin.
Restoration is possible.
You can live your life in a way that honors God. You can choose to change and start over. Hardness of heart can lead to the most awful set of circumstances in marriage, but when we come to Christ, no matter what the circumstances, he removes the isolation and the stigma, and then he sets us on our feet to do it right. The New Testament allows for the fact that some are victims of their partner's choices. Some have been abandoned, left for another.