The union of souls in the marriage state, like everything else, ought to be under the guidance of the Spirit of God. The first work, both of man and of woman, is the recovery of their own souls, their spiritual sanctification. Until this is done, they are not fitted, — certainly not in the full sense of the terms, — for anything else. And especially do they fail of being fitted for true mental union.
In the present state of the world, and in the imperfect condition of human things, it will often be the case, that those who are brought into the marriage state by human arrangements, and under the forms of human law, have not been united by spiritual attraction. Such marriages cannot be happy; — certainly not in the highest degree. It will be very different, in proportion as holiness advances in the world. In a purified, or millennial state of the race, the first step towards the finite marriage will be the marriage union with the Infinite. This, as we have already intimated, is the first great work of man under all circumstances; a work which cannot be superseded by any other; and without which no other can be perfectly done. When the soul is once united with God, it becomes the subject of the divine guidance; and while it loves all, and seeks the good of all, it enters into the state of perfect union only with that soul which develops most perfectly corresponding traits of character. The instinct of holiness will lead together kindred hearts; and the truth of spiritual union will take the place of the falsehood and misery of that union which merely allies the body without the union of the mind.
Edited from A Treatise on Divine Union (1851) Part 7, Chapter 6 by Thomas Cogswell Upham. His blog is managed by Craig L Adams and can be found here: http://thomascupham.blogspot.com