If it's a square area, a 400w hps is minimum, but a 600 would be better. Yes you are going to need to vent that heat somehow. And no, going cfl won't help with the heat, that grow is too big for them anyway.
40 plants? What are you growing a zero veg sog? Even still that's a lot.