Find out if the insurance company is going to total it before worrying/making any big decisions. If they are paying to repair it, make sure there is no damage beyond the outer body panel. As Mike said, a good body shop will do that.
If they total it, you should have the choice of taking the total payout and surrendering the car or having the payout reduced by the residual value and keeping the car.
Surrendering the car should give you enough value to buy a comparable car. Look at what the adjuster is using for comparables and make sure that you agree they are equivalent and in your local market area.
Keeping the car and repairing it yourself can take a lot time and effort, but if you have an attachment to that particular car can be worthwhile. The resale value will be greatly reduced, but if you are not planning to sell it doesn't matter. You can probably find a 'bargain body shop' that will fix it reasonably well for what you get in the payout.
Sell it to me for the residual value after your settlement. I already have the parts car ready to cut the replacement panel from.