IMO, you really do not want to try to bend the hammer while it is still attached to the lock.
If you do, and you try bending it "cold", you stand a good chanch of breaking the square drive end which engages the hammer off of the tumbler.
If you try heating the hammer to a red heat, you stand a good chanch of overtempering the tumbler and removing it's hardness.
To remove the hammer from the square drive on the tumbler you will have to disassemble the lock.
I say this because the method that almost always screws up the hammer, the lockplate and often the tumbler is to remove the screw and to try to pry the hammer off of the lock. This can break the tumbler, gouge the face of the lock plate and enlarge the square drive hole in the hammer.
To add insult to injury, it sometimes still won't remove the hammer.
There are threads about disassembling a sidelock on the Forum, and you should do a search for them to get all the information you can.
You will need several good screwdrivers. One to fit the hammer screw, and one to fit the locks internal screws.
Assuming you have a lock with a flat mainspring, you should use a mainspring vise.
Some people have used Vise Grips to compress the locks mainspring (including me), and some people have ended up with broken mainsprings (including me). A mainspring vise made especially for this task is highly recommended. They are available from TOTW, Dixie and many other places and will set you back about $20.
Whether you buy one or not, the idea behind removing the mainspring is the tool (vise or Vise-Grips) doesn't compress the spring. It just holds it in it's compressed position.
To do this, cock the hammer to the full cock position, apply the vise and then release the hammer with the sear. When the hammer falls, the spring will be left high, dry and restrained and will easily be pulled out of the lockplate.
After the mainspring is removed, remove the screws that hold the sear spring, the sear and the bridle (the bridge over the tumbler axel) if it has one.
Do not loose the little "fly" which is on the tumbler. Put it somewhere safe. It is very small and easily lost.
Support the lockplate on the back side with two blocks of wood, or on an opened bench vise so the tumbler is hanging in space.
Use a soft drift punch which is just a little smaller than the square drive, or use a nail which is smaller than the hammer threads and lightly tap the tumbler out of the hammer square drive hole.
If your lock uses a link between the mainspring and the tumbler, make a good sketch of how it fits into the lock before removing the mainspring. If you put it in backwards, it will not work.
Reassemble the lock in the reverse order, but remember you need to gently tap the hammer back onto the tumbler until it seats.
Don't forget to do a Search and some reading before you tackle this.