So, Mazda stepped up and covered the head repair, even though the car is out of the factory warranty period and after your 3rd party warranty provider (CarShield) refused to cover it. Seems like a positive resolution to me.
I don't know if Mazda had the opportunity to step up for the transmission, but since your transmission issues were poorly handled by CarShield, shouldn't some blame be directed towards them? I mean yes, Mazda's transmission did fail in the first place, so that is something I would be complaining about as well. But CarShield is the one who messed up the repair, right?
Anyway, to complain to Mazda Corporate in the US, you can send a letter to:
Mazda North American Operations
Attn: Customer Experience Center
PO Box 19734
Irvine, CA 92623-9734
Or you can email the Customer Experience Center by filling out
this form.
You can also call them at (800) 222-5500, Monday-Friday from 5:00 am - 6:00 pm PST and Saturday from 7:00 am - 3:00 pm PST.
I would write a letter and mail it, then send a copy of that letter to them via email. Wait a day or two, then call them on the phone, immediately requesting an escalation to a manager if possible, and then referencing the email and letter.