Are external diodes needed to protect these MOSFETs from back emf?
If your goal is to pulse the electromagnet in alternately reversing polarities then you can either use a half-bridge:



simulate this circuit &ndash; Schematic created using CircuitLab
Or an H-bridge:



simulate this circuit
You can use clamp diodes, TVS diodes, or RC snubbers or combinations thereof to control the inductive kick.
The vast majority of discrete MOSFETs have a parasitic body diode which can serve the same purpose as the rail-clamp diodes in an H-bridge but, being parasitic, they are usually not optimized for the purpose. External rail-clamp diodes will be better.
Rail clamp diodes cannot be used in the half-bridge configuration.
I repeat: Rail clamp diodes cannot be used in the half-bridge configuration, unless you feel like having the flyback current routed through your power supply.

Rail-clamp diodes (D1 to D4) will clamp the voltage to the power supply rails. The diodes will have only low heat since they operate in forward bias but that means the energy stored in the magnetic field of the coil will be dissipated in the coil resistance (or R1 if you have it). Will not control dV/dT.
RC snubbers Do not clamp to a fixed voltage. Instead they lower the voltage spike compared to what it would have otherwise been. Slow down dV/dT and are faster than diodes since they are &quot;always on&quot;, but less efficient as a result. Use capacitors and resistors rated for pulse loads and with low parasitic inductance. Since it works by reducing dV/dT it will help if high dV/dT is causing MOSFET misbehaviour due to transient currents finding their way through the MOSFET parasitic capacitances whereas diodes will not.
TVS diodes (D5-D6) Clamps the voltage across the coil to a fixed value. High power dissipation in the diodes since they operate in reverse breakdown. D1 and D2 here are two back-to-back unidirectional TVS diodes or you can use just one bidirectional TVS diode. Will not control dV/dT

For the H-bridge, you can also place TVS diodes or RC snubbers in parallel with the inductance similar to what was done in the half-bridge.
For the same power supply voltages (i.e. for the same 'V'), both half-bridge and H-bridge can apply the same voltage to the coil in both directions. However, the half-bridge requires only two power transistors but requires two voltage supplies whereas the H-bridge requires four power transistors but only one voltage supply.