By whom?
Here's the thing: You did this in secret, and you put the baby at risk because you don't know how to take care of a baby. Now when mom goes to court she'll have the record of your sneaking into her house to whisk the baby away and your being incapable of basic baby care - and you're going to try to convince the court that she's the one who's mentally ill?Quoting anxiousdad
Will you be charged with neglect? Despite your best effort, I doubt it - but only time will tell. Frankly, if you're charged I would find B&E to be more likely.
Did you just dig yourself into a giant hole, custody-wise? Yep. And no matter how much you waggle your fingers at others, nobody here told you to do what you did - and had you said, "I'm going to sneak into the mother's home, take the child, not tell her, and try to keep the child long enough to claim to be the status quo custodial parent," you would have been told the obvious: You're nuts if you think that's either a good idea or that it's going to work.

