A majority of legal workers are suffering from poor mental health due to work pressures, a survey has found.