If your child is hurt, angry, rejecting, and distant they may come at you with a lot of negative emotion and strong accusations. You may be tempted to respond by saying something like "I am sorry if I hurt you" or "I am sorry for everything I have done that might have hurt you" but generally that does not work especially if the child is being influenced to experience you as unsafe, unloving, and unavailable. A much more specific and meaningful apology is often needed. To be clear, I don't believe you need to apologize for things you did not do, but if your child does raise a complaint about something that you did which you feel requires an apology, then you might as well do it right!
Here are my seven elements of a "good" apology: (1) show gratitude by thanking your child for sharing their grievance (2) show compassion by noticing and acknowledging their feelings (are they sad? scared? worried? angry? confused?) 3) be empathic by putting yourself in their shoes (4) acknowledge that you recall the event (5) say that you are sorry that you did it (6) express a wish that you had done things differently (7) ask them what that was like for them. And for sure avoid the three temptations that can ruin even the best apology! Don't explain (provide context for why you did what you did). Don't justify (describe the child's behavior that provoked your response). And don't minimize their pain. If your child brings up a grievance that you feel you already apologized for, don't despair or say to your child, "I already apologized for that. Why are you bringing that up again?" Say to yourself, "This is awesome. I get another chance to apologize. This time I am going to give it all I have so that my child can experience me as safe, loving, and available."