Processed meats such as bacon and hot dogs are linked to mental breakdowns, a study suggests.