They'll do funny things sometimes, these trees LOL!
Its hard to figure the best way to straighten it, be nice if it could be rolled somehow and not have memory of that bend after its done. The gap for the drive part of the chain link is easily repaired with the flat head part of the spark plug/bar nut socket tool. That part will be fine once straight, but that bar does need to be straight. Its hard to tell if its racked and not just bent evenly. If it can be made true, it would be fine, but its hard to tell if there is any other damage to be concerned with. Once straight and the chain moves freely in it, you'd have to test it in larger wood to see if it cuts straight.
On the other side of this, the chain runs at 50 mph, and that's a yellow label bar, larger tip radius, a little more prone to kick back, at that speed you don't want any anomalies, and if the bar is not true, it won't cut straight, you'll notice it in larger diameter wood.
You may want to go over the chain that was on it too, especially if it stayed on the bar, it could be stretched or damaged. A tossed chain is one thing, snapped chain is another.
I'd err on the side of being safe and get rid of both the bar and chain, its not worth the injury or aggravation. The first bar on my '02 MS390 was worn, needed surfacing, but it also was a tad bit wavy towards the end, did not cut straight and liked to bind, the new one made all the difference.
Late last summer, I went to fell either side of a beautiful old black cherry tree, a triple, the center being 100'-120' both the outside trunks died. I made face cut just so, but with leaving just a little wood on the inside next to the center trunk so as not to damage it. The darned thing pinched in the back cut, just how it goes sometimes, it had a good lean, and even with 2 steel wedges, I could not get it free. It turns out I should have cut a little more depth on the vertical cut between the trunks, you just can't see sometimes. So I walked away from it and got out of its path while rigging it as best I could, then pulled it right over, having taken the power head off my saw already, just the bar and wedges in there. It came right over and exactly where I wanted it, as it fell it pinched that .50 gap in the new bar. I was able to repair that and you'd never know it now, you could feel the tight spot in the chain and I saw the rivet indents in the trunk, just pinched the outer edge of the bar was all.