How long does a landlord have to replace/repair a broken furnace?
Can I deduct rent to offset the cost of the extra space heater the ring up my electric bill?
There is no hard and fast answer--while a landlord must replace a defective furnace, the law does not specify a certain or specific time frame. Rather, the landlord has a "reasonable" period of time to make the repair, following having been provided with notice (it should be written notice, sent some way you can prove delivery) of the problem.
You cannnot withhold and deduct rent for the space heater, not without violating your lease and risking eviction However, you could sue to recover your additional costs. Normally, it would not make sense to sue for the difference in electric bills, but since you may sue the landlord anyway (see below), if you do, you would add that cost into the suit.
If the landlord does not fix the problem within a reasonable time, you could sue him or her, seeking a court order ("injunctive relief") forcing the landlord to repair the furnance. You can also, in that lawsuit, seek your additional costs (the higher electric bills) and/or other compensation (such as a retroactive rent abatement for the period of time you have lived without or with less heat). As a general rule, if you have to go to court anyway, you may as well sue for everything you potentially can.
You should consult with a landlord-tenant attorney about this situation. The lawyer can guide you in vindicating your rights.