At the very minimum, she realized that her keeping this kid would not be in anyone's best interests. Obviously she can't Ctrl+Z a loaf (not legally anyway), but not being its parent when she has a mental illness that is worsened by the child's existence is the next best thing.
Her story may have been more suited for r/regretfulparents, but at least she is getting support.
So what happens if the father doesn't want the kid? I assume he cannot be forced to take full custody of the brat if she has no interest in keeping it. Because as much as he gave the author a hard time about struggling with the loaf she didn't want to begin with, that does not necessarily mean he will put his money where his mouth is and be a father to this kid. I also very much doubt that this man is a horrible husband, but an amazing father. If he is a piece of shit to the author, he will be a piece of shit to his kid too. It seems like he wants custody, but that shit might change once he's a full-time single father.
I commend her for finally getting away from her presumably abusive partner. It took five tries, but it's very hard to get away from someone like that. Many people don't realize just how hard it is to escape the hands of an abuser and will offer such helpful advice as "Well, just leave then!"
I hope she can even get sterilized since she's only 20-21 if she got up the duff at 19 and has a 14-month-old. Even if she's had a brat and has a mental illness, some asshole in a white coat might decide that she's too young and immature to make such a permanent choice about her body. Even if she goes into explicit detail about how the brat existing put her in the psych ward, some doctors won't even consider performing a tubal unless a woman is over 35 or has had 2-3 kids.
It would probably be best if she wasn't in the kid's life at all, though. Because it would probably mess the kid up to learn that it has a mother, but Mommy just can't stand to be around them for more than a couple times a week.