first off contact your insurance company and set up a claim and have an adjuster come look over the vehicle after it is in a safe spot be that a shop a tow yard or your driveway and if you think it is fixable have it towed to a trusted repair shop, if you dont have one ask friends and colleagues for good recommendations. with as much damage as you describe that really sounds like the insurance company may cut their losses and total it though. especially as you said it buckled the door out thats usually a good indication something underneath got bent bad and it usually is the frame, but until a shop can tell for sure they wont know unless you get an adjuster that has been doing it awhile and knows their stuff.