bldc regenerative braking, braking torque
I'm no expert but I would add to John Birkinhead's answer that for a battery powered system you can sink the current back into the battery while the regen voltage is higher than that of the battery. This, of course, is only possible for rechargeable batteries and charge current limits will apply. As the motor slows down the voltage will fall and when it goes below the battery voltage then you'll have to burn it off in a resistor. 



Figure 1. A typical VFD drive system with braking resistor controlled by PWM when the DC voltage rises above a certain level. Source: Invertek Drives (which is well worth a read).

For a mains powered device you (usually) won't be able to feed back into the mains so you'll need to monitor the DC bus voltage and, when it rises above a certain level, you'll have to dump it into a resistor.