You're not a bad mom!!! You just thought you were helping her

You're doing your best, and sometimes these babies take a little longer to potty train. I don't think you have undone everything. Just be consistent with whatever you do
It's important that you put her on the pad when you see her peeing/pooping in the wrong place so that she knows to go there. Putting her back in her x-pen makes her think that's where she's supposed to go.
Good luck!! And keep us updated