How Do I Get Out of Boot Loop on iPhone 4?
My advice would be to fix your home button (here's an excellent guide from ifixit if you want to fix it yourself: https://www.ifixit.com/Guide/iPhone+4+Home+Button+Replacement/3144) and then put it into DFU mode. If your home button is dodgy, fixing it will greatly enhance your chances of getting into DFU mode in order to restore it within iTunes.

There are tools that exist to get your device into DFU mode with a broken home button however these are unlikely to succeed if iTunes isn't detecting anything and your device is bootlooping.