I have a toddler, and yes, I have accidentally yelled at her in the heat of a meltdown and said things way more harshly than I should have. It’s usually after the 2nd, 3rd, or 4th meltdown of a long day and I finally crack.
However, that’s no excuse. It’s my job as the parent to be emotionally regulated. Children (especially young children) are physically incapable of regulating their emotions, so that is my responsibility to be their missing fully-developed frontal lobe. This is one of many responsibilities you are signing up for having children.
Everyone has their breaking point. We are all human. But as a parent, if you feel yourself at your limit you need to shut your mouth and step away from the situation (if possible) and collect yourself.
I’ll be honest, parenting (correctly) is very difficult, and it’s common to have passing thought or regret when things get really hard. I’ve been there a few times, but I have never, and couldn’t imagine saying something that cruel to my daughter. Even if she was being willfully spiteful or vindictive, I still love her to her core and I am endlessly grateful she is in my life.
I’m not sure how old you are, but my best advice is to try not to take that comment too personally. When she said that, it wasn’t actually about you. It was about her, her choices, and her struggle to manage the consequences of those choices.