Safely discharging large value capacitor without blowing it up
The capacitor should be the least of your concerns here. Let's think about this for a minute. 

Using your MOSFET's on resistance and the \$1\Omega\$ to discharge, your time constant will be:

\$\tau = RC = 40mF \times 1.0035\Omega = 40.14ms \$

Using the 5 time constants to charge/discharge rule, your discharge time will be:

\$5 \tau =40.14ms\times5=200.7ms\$ 

(Note: You don't give a datasheet for the caps, so the ESR is unknown, and if it's high relative to the resistor and MOSFET on resistance, all of these numbers are wrong.)

Using your peak discharge current:

\$P_{R} = I^2R = (0.5979A)^2\times1\Omega = 357mW\$

\$P_{Q} = I^2R=(0.5878A)^2\times0.0035\Omega=1.25mW\$

As you can see, over 99% of the stored energy is dissipated as heat in the resistor. You should make it a half Watt resistor. You could do the calculus and find the actual average power, and find a quarter Watt would work just fine. 

As long as the discharge current falls within your MOSFET's \$I_D\$ rating, this is a perfectly safe way to discharge that capacitor bank. You need to look closely at the datasheet and make sure they are low ESR caps, and check out their thermal characteristics to be completely sure you won't hurt anything. Given their size, intuition says you'll be fine.