once I had a bad battery, that made the phone restart when the phone needed some power(for example when started downloading something, turned the wifi on, turned the flashlight on, used bluetooth, etc) that was because the battery was not powerful enough to deliver the current to the phone and it caused reboots, after a while it caused the emmc of the phone to fail and it actually killed the phone. :(
first of all make sure the button itself is corrupted, in some cases the ribbon cable of the button has just came out and you can fix it by putting it back there. it's shown in replacing the screen/digitizer tutorial, just unmount the back cover (which is held down by screws) then detach the top board (it has a single screw.) then you'll see the power button ribbon cable and the power button itself (it's held down by a tiny flexible black plastic, just pull that out off the main chassis).
It's mount on the back cover, you can see the tutorial for replacing screen/digitizer, it starts by detaching the back cover, and then when you have unmounted the back cover there is the speaker. first make sure that you're right and the speaker's death and then when you're sure buy a new speaker (there are some in eBay) and then replace it with the old one. here you can see mine which has a number on it.