Remember that this is probably only net-positive if you use the heat generated for something useful.
Eg: Using electricity to run a computer that generates heat is more beneficial than generating heat directly from that electricity.
But in eg the summer when you have no use of that heat you have to weigh the calculation output versus the energy input and only when that calculation is positive you can justify running it. (And if you plan to cool it down with an AC then the equation will for sure not pay off)