Assuming the primary side here: Connecting the heatsink to the earth system can cause common mode issues with stray heatsink currents caused from capcitivly coupling between the switching devices and heatsink being added to the (unshielded) earth... whch will radiate. If your heatsink is isolated from your chassis and can meet all the other clearance requirments it can often be better (EMC Wise - Safety another issue) to connect it to the power supply neutral. Best to include prototyping options so they can be assessd in the test chamber. I'll look at the diode later..