Yes sir. that's a bit of a doozy. However, I'm not too sure if it is totalled. The main problem here lies within the frame. When you get into frame damage, is basically when the price skyrockets. Just take it a day at a time, and see what happens. I think It should all work out in the end for the best, as always. But you definatly should be sticking with the Mazda community, and brand.
glad you are ok. keep us updated man.