If the bent part is the pannier supports, where they are "parallelogrammed" to the side of perpendicualr to the actual rack itself, then you can fixture the rack to something, then bolt a clamping plate (wooden panel, block, etc) to the rack or the something so it secures the horizontal tubes in place so they can't move (if they aren't bent), to rebend it back to where it needs to be.