Divorce and living in different states...

Has anyone divorced their SO and moved out of state? What was/is your experience with this? How did it affect your child? Do you regret it? Unfortunately I believe my marriage is coming to an end. I don’t want this but i don’t see any other way. We are miserable and it is not fair to our son. Any personal experiences with this?