Balancing emotions

Ma

My daughter is 2.5. Her brother is 3 months. The past 2 weeks have been awful. She has been behaving SO badly. I know she’s learning, but she’s been doing things she knows are wrong because she’ll do it and then say “time out.” When her brother was first born she was super jealous and swiped at him a few times. We had her apologize then show him “gentle hands.” And she had been good for a while. Today he was doing tummy on the floor and she loves to stack blocks for him to knock down. She also had his hard plastic ball that rolls around by itself on the floor and I told her to move it away from him because it was was rolling too close him. She kicked it right into his face 😔. So I took it away and she flipped out and hit me. I put her in time out (but I’m holding the baby because he is screaming his head off because it hurt him) so she hits him on the head 😔. I had never been this angry with her! My husband was mowing and I made him deal with her because I was so upset with her and felt so bad that her brother got hurt. I love her SO much but this deeply saddened me. Like I feel like I don’t know her anymore. I love her no matter what but I’m having a hard time letting this go- like just enjoying time with her if that makes sense. Any words of encouragement?