The amount of heat generated is proportional to the mass of the aircraft and its ground speed (Kinetic Energy = 1/2m V squared). The brakes extract kinetic energy from the aircraft and convert it into thermal energy. Whether you use heavy braking for a short period, or light braking for a longer period, makes no difference to the amount of heat produced, provided the mass and overall deceleration is the same in both cases.
This does not mean that both methods will produce the same brake temperatures. The brake temperature also depends upon the amount of heat that the brakes can dissipate to the atmosphere during braking. while friction is putting heat into the brakes, the airflow over them and conduction into the rest of the landing gear, draws heat away from them. The temperature rise depends upon the relative rates of heating and cooling.
Harsh braking for a short period will reduce the time available to dissipate the heat, so the brakes are likely to reach a higher temperature. But this higher temperature will also increase the rate of heat disipation, so the overall relationship between braking time and brake temperature is not a simple linear one.
The key to judging the overall effect is to note that in order to benefit from the increased heat dissipation rate, the brake temperature must be greater. So harsh braking for a short period will tend to give higher brake temperatures than light braking over a longer period. It will also wear the brakes and tyres out more quickly, and increase general wear and tear on the aircraft.