If you've lost the password/passcode to a locked iPhone, you have very few options:
- If you have access to iCloud, remote wipe it from there
- Put the device in recovery or DFU mode and reinstall your preferred version of the iOS.
Obviously you'll lose all the data on the device -- without access to the device you can't authorise iTunes to access the contents to bake a backup, for example - and you're limited to the version of iOS that Apple is still currently signing (they typically stop signing older versions a few weeks after a new version is deployed)
Sadly, you're quite stuck, and apart from the above, or a visit to your local Apple distributor, there isn't much you can do.
If, however, your phone is stuck in a boot loop, you can try one of the few "hail Mary" options which have saved my bacon more than once. There's a tool called Recboot which will try to put your phone into recovery mode (or you can try to octopus-like method yourself), or (and this is the life-saving bit) get you out of recover mode.
I don't personally own the software, but have used it to get out of a few jams in the past. You can find instructions on using the (free) software, plus download links here