For high resistance load, Battery lasts longer?
For purely resistive loads, power dissipated can be calculated with $$ P = IV $$ where I and V can be substituted using Ohm's Law, eg: $$ P = I (IR) = I^2R $$

Hence where your H equation comes from. That just takes into account time as well for a total loss over time. To answer your concern about high resistance equaling high heat, higher resistance means lower current. Because current is the squared term in the power equation, it tends to have more mathematical "influence" on the total power consumption. You'll find that a 10ohm resistor with 10V applied (1 amp, 10 watts!) will have higher power than a 100ohm resistor with 10V applied (100mA, only 1 watt). So in fact, a lower resistance will result in higher current and brighter LEDs at the cost of faster battery drain and more heat dissipation via resistors.

The answer you linked has way more on this, but for completeness and to summarize: Battery capacities are measured in millamp hours(mAh), which is simply how many milliamps it can put out for 1 hour. A 500mAh battery can output 500mA for approximately 1 hour. The relation is linear too, so that same battery could put out 250mA for 2 hours or 1000mA for half an hour.