My biggest regret for things in the past is not being kind to myself and acceptance. We are often our own worst critic, beating ourselves up over choices made and even feelings. But actually when I think of things I wish I could have done differently I didn't know any different then. I have given myself a hard time thinking I should have known, if only....But I didn't know - how could I? I only knew what I knew then. Being older wiser with more life experience can only help in current and future choices.
You can't change what happened and you probably made a good choice based on the information, knowledge, and experience you had at the time. Maybe that was for the best then. Maybe there was no perfect choice
and you took one of what seemed a good option. None of us can see round a bend!
Looking back with different experiences/age/wisdom is natural. Your learning is how you would approach situations now with information and knowledge you have as you are. Pretty much as @HappyBirlingDay describes.
If you feel you are making the same types of 'mistakes' /or bad or harmful choices, you could explore some therapy to understand why and try to change this.
It sounds like you are beating yourself up & there's no value in that. It's hard but work to accept
what happened. It might help to identify good things that came out of those choices - be grateful for those things. Allow yourself some time to grieve for what you wanted but try and draw a live so you can move forward.
Try and be kind to your self - would you judge your best friend in the same way as you are yourself? Model what you'd want your daughter to do in certain situations.
Try and be a guide or teacher to yourself not a critic. Maybe you can try and look back with compassion, love and understanding for your younger self?
Can you work on empowering yourself to have the life you want now for yourself and your daughter. What would you like to change?