Desoldering a component with 40 pins is quite arduous without proper equipment and some experience. The trick is to heat all pins at the same time - a hot air gun comes in handy. Of course you wouldn't want the heat the PCB or adjacent components. Another way to remove the old header is (thanks to Steve Robillard) to use some cutting pliers to cut them into pairs then heat up the pairs and either pull or push them out. Again careful handling is imperative; cutting the header might damage the board. It could also be possible to heat single pins of the header (from the backside of the PCB) and pull them out individually. After removing all pins the pads and holes need to be cleaned with desolder braid or a small tool - Mr Robillard recommends a small drill bit or male header pin (not the round ones) chucked in a slow speed drill. Here's something about the "Slap Method" for through-hole rework (discovered by Goldilocks, thanks).
If you really want to go that way: it uses a standard 2.54mm (0.1 inch) headers (see here). They should be available at virtually any (online) shop that sells electronics components.
However, I would try to bend it back first. Be sure to disconnect power first (obviously). Using flat nose pliers (a small tool) it should be possible to bend single pins back.