Almost did the same to one of our cats, our baby, by mistake. I had left the car door open for some reason, and my wife came home and shut the car door. Luckily for the cat, it was overnight, so not hot, and the worst that happened was that she got panicked being locked in the car. The downside for me, she shredded several parts of my cars interior (headliner, door sill, a-pillar covering, etc...) You can imagine what my first thought was when I saw what the cat had done (after letting her escape and before realizing what she'd done!!)
Then of course I gave my wife a broadside for not checking the car, but truth be told, I probably would have done the same as she did. I hope you get past this.