I had this happen to an 03 with the tailgate down, damn kids texting. Similar damage. I had them get a new/used bed from Tx, no rust, but dinged a bit, mine was like new under the bedliner. I did not think they could patch it in, but it was a flareside, so they got the entire new outer fiberglass skin and just welded in the inside corner by the tailgate hinge with a replacement part and it came out way nicer than a used bed would have looked. Plus only had to paint the one side of the outer bed then.
I had no frame damage, they were going 45mph, and I was stopped for a left turn. Saw them coming and floored it last minute to about 20mph before they made me go into a forced drift, but I am sure it helped that I was under full throttle.