Several theologians and writers have written about marriage as a covenant. The latest one I've read is Tim Keller.
The marriage as covenant idea says marriage is to be viewed as a covenant between spouses, "a sacrificial commitment to the good of the other." Marriage is not a commercial contract, where you are willing to give something to get what you want, but the emphasis is on getting what you want, and you are willing to consider getting what you want from another vendor if they offer better quality or a better price.
This idea of marriage as a covenant shed a new light on Jeremiah's promise of the New Covenant. There's an odd phrase at the end of verse 32, "because they broke my covenant, though I was a husband to them.". Jeremiah 31:32
Jeremiah says God is the husband who resolves to stay committed and to make the covenant relationship work. If ever anyone could have said "You're not meeting my needs," or "We've grown apart," that would be God. But he doesn't start all over again with a new people, he keeps the ones he's chosen.
May God inspire us to faithfulness in our covenant relationships.