I assume the mech hanger is aluminium, as normal. Aluminium is much less able to handle fatigue caused by this kind of bending than steel, I would advise strongly against trying to bend it back into shape.
The only reason your bike even has this part is so that you can install a new one cheaply when you damage it in this way. Without it an aluminium frame would be damaged and written off.
It looks as though the frame dropouts have stayed still, but your LBS will have tools to check their alignment if you don't want to buy these. You should check the alignment of the dropouts and source a new hanger. Easily sourced online if you want a DIY solution.
Then you could try installing the derailleur if you determine it is still usable, or buy and install a new one if it seems damaged. It looks bent from here and worth replacing.
Bottom line is you've trashed your derailleur hanger and need to put up some cash. The silver lining is that because of the hanger it is much less expensive than the cost of a new frame.
Hope you're back on the road soon!