Feeling guilty bad mom..

been hanging out with my friend both our kids are 2 and her son is violent. He bites, pinches, pushes and takes my daughters toys and my friend tells him something but he doesn’t listen.. she just says “stop” and the kid does it again.. well today we hung out again and I saw my daughter hit him randomly when she NEVER does that and I yelled at her. I put her in time out and she freaked out and I yelled at her again.. (very overwhelmed).. and the little boy just kept taking her toys just being annoying and my daughter would scream and cry and I think I was more annoyed with my friend not doing anything I would yell at my daughter to stop it.. Just feeling really bad for how I treated my daughter today when it was her son and her barely disciplining him to stop.. I usually have a lot of patience with my daughter but truly my daughter never acts the way she did tonight with her son. Yelling, randomly hitting, crying.. when I gave my daughter she just sat close to my on the couch and didn’t move 🥺😕😕 idkk just feeling so guilty and upset I let my annoyance towards her effect the way I parent my daughter.. me and my baby don’t have a relationship like that and it’s making me want to cry right about now. I don’t even wanna hang out with her anymore.

It’s upsetting me more that I disciplined my daughter by yelling and putting her in timeout when she was just doing what the boy was doing to her. Yet my friend wasn’t doing anything.. I feel like I should’ve let my daughter hit him without getting upset with her