I would not advise attempting to repair that battery yourself.
If the battery has indeed swollen up, then it is likely going to be pressurized and/or extremely volatile. Lithium packs like that tend to ignite on contact with oxygen (air), so if it ruptures you will have a very spectacular fire on your hands with lots of toxic smoke.
The battery has NOT burst. This is evident by the fact that your phone hasn't been reduced into a smouldering pile of ashes.
Take it into an Apple centre. Carefully. Do not try to push the display down, you'll probably just burst the battery and then you WILL have a flaming hot 3GS device to deal with. Apple should replace the unit, since this kind of thing is extremely rare and extremely dangerous- they are potentially liable for this kind of failure if the pack ever ruptured and started a fire.
Again, do NOT attempt to repair this device yourself. If your logic board is really bent that much I think it's a lost cause anyways- the BGA solder points on the PCB would have snapped off, rendering the device inoperable. You should take it into Apple so they can dispose of it and get a new device.
-SC