How to use iTunes to solve iPhone freezing problem
How do I unfreeze my iPhone if the lock button is broken? Well, if all else fails you can use iTunes to factory reset your iPhone.
Recharge your iPhone
Charge your iPhone first. Sometimes a glitch on the charging controller chip reports the wrong power percentage left in the lithium ion battery.
Use iTunes – Easy Version
Connect your iPhone to a computer and open iTunes. If it pops up as connected, click Restore on the Summary pane.
Use iTunes – Forced Version
Force your iPhone into recovery mode. This is your final option in case all the first steps fail you. Turn your phone off and leave it for about 20 seconds before connecting it to a computer via USB while holding down the Home button.
Make sure you were holding it down when you connected it. When the Connect to iTunes Screen pops up release the Home button. Then use iTunes to restore your device to the factory settings (the way it was when it was first turned on the phone after it came out of the box). This will wipe the iPhone clean, but hopefully you’ve backed it up and can restore it through iTunes.