["I felt so badly today because my son overheard me yelling and cursing out his dad because he was late picking up our son.  I didn't mean for him to overhear that but I was really angry.", "Aw that's tough!  Have you talked to him about it?", "I haven't had a chance yet since he's still with his dad.  I hope to call him later tonight."]
It might have upset him but I'm sure he'll understand!  Everyone loses their temper sometimes and it's not like you didn't have a legit reason
I was feeling really badly when my child heard me swear and curse out his father because I was mad he was late picking him up.  I didn't want him to hear me treat his father that way but I was really angry.