What a mess. I do not know how you propose to continue on with this crazy making Ms X, that all by itself seems like an emotional roller coaster. Infatuation as you say, is by definition, temporary. But, leave that alone for a moment and think in real terms about how you intend to proceed.
I think your only option is to wait for her. Wait until she ditches the boyfriend, gets herself settled into some sort of life without him, as a single mother who works to support herself and her child. Like a grown up. She will also be juggling a baby daddy, so factor in you need to give him space to be a dad too, and his responsibilities to your lady-love.
Until she can put the boyfriend out and move on, how can you continue to confuse her situation/emotions? Give the girl a break dude! She may decide she wants to make a go of it with him. Do you love her enough to let her go if she does? I know you want her to choose you, give her the time she needs to make that choice.
You need to sacrifice contact and she needs to make a decision without your influence. Let her know that you will wait for her, then do it.
As to your baby mama, give her a break too. She needs to know you want to be as big a part of the baby's life as possible. Stop apologizing for the damage you have done, you can't fix it so do what you can to take care of her and the child. She deserves every bit of your respect as she wades into uncertain waters, being a single mom. She did not sign up for that when she fell in love with you.
You are on the right track, just stay on it, stop thinking about love or infatuation or whatever else keeps you distracted. Live with as much integrity as you can muster. Focus on that child. The love for this child will change everything in ways you can't know until it happens.
I really do wish you All the Best ...