Ironically, a huge amount of thought and effort was required to be comfortable with this idea and continue to raise a child; but it's still not the kind of realisation anyone would be glad about getting right.
If it was the right thing to do then I'm sure, in time, you, your ex and your kiddo will realise it was the right decision and be glad of it, and that's much better then dragging everyone through a bad relationship till it's too late to untangle it all without someone getting hurt