As a child of divorce, I can say with certainty that you will always have a relationship with your child.
If you do only get him/her twice a month, you make sure that those are the best weekends on the planet! Trips, adventures, trips to the pet store, the city, sailing, rock climbing, the zoo, whatever! You would be the parent the child looks forward to, not the parent of the drudgery and the dam dailies. In a strange way, that’s a gift.
As for your spouse, I don’t know her resolve and if she’s already gotten a lawyer, but you haven’t been served YET. Especially if the child is young you can entreat, beg and beseech her, to seek counseling with you, a couple’s retreat, a remedy for whatever is the matter. “Then we can get a divorce, perhaps, when he/she is a little older”. By then the issues could be worked out, who knows.
You hang in there. Take care of yourself. And get great at compartmentalizing things.