On the E9x M3 there is a documented procedure for the emergency release of the parking brake, however it still assumes you have battery power...
This process is NOT documented for the F10 M5 (at least not in the online version of the manual) and I can't confirm it right now as the car is in hibernation
But here you go :
* Removed the shifter boot is to gain access to the release mechanism.
• Using the screw driver from the vehicle tool kit or (similar tool), unclip the release mechanism cover.
• Insert the screw driver/tool in the release mechanism to the left of the shifter.
• Move the release toward the rear of the vehicle and observe the shifter indicator light illuminate the “N” position