It may be irritable bowel syndrome or intestinal dysfunction, especially when the mood is affected and the diet is inappropriate.
Suggestion:
You can eat lactic acid bacteria tablets and multi-enzyme tablets for a period of time. Don't eat spicy and greasy food at ordinary times, and keep a good mood.