You're in the middle of a custody battle, and it's extremely frustrating. Nothing you've done has ever made it seem like you're not a good parent, yet your spouse is trying to make it sound like you're not there for your family.
It's important that you and your spouse try to come to a resolution together. This kind of situation is bad for your children and bad for both of you. You'll need to work together in the future to raise your children, and barring any unusual circumstances, the court would likely rule to provide both of you with shared custody.