How to turn off Find My iPhone without unlocking iPhone? (iOS 8.4.1)?

My phone powered off when it ran out of battery and now I can't use touch ID and I forgot my passcode.

My phone was backed up on my mac but in order to restore the phone and then restore the backup, I need to go on the iCloud settings on my phone and turn off Find My iPhone to be able to do this.

How can I do this when I don't even have my passcode?

The passcode and the Apple ID password are not the same thing. If you can't remember the passcode, your only option is to reset the phone or restore it from a backup. You don't need to turn off Find My phone to do any of this. You may be asked for your Apple ID password during a restore or reset operation. The operation can't be completed unless you provide this password. If you've forgotten your Apple ID password, you're out of luck.