It is very likely that your fasting is the source of your bad mood! When you fast, your blood sugar levels start to drop. Additionally, the body starts to digest proteins and fats to produce energy; some of the byproducts of fat and protein breakdown include ketones. Both low blood sugar and ketones can influence your mood, as can the hormones the body releases as part of the starvation response.
In general, I would recommend that you stay away from fad diets that involve purging or fasting. These types of dietary approaches have never really been shown to be of sustained benefit to the body. Although some people who use fad diets do lose some weight and thereby achieve their short term goals, this approach to dieting does not help to reinforce healthy eating habits which can be sustainable over the long haul.
Additionally, fasting and other extreme dieting approaches can actually be dangerous for some people with chronic medical conditions, such as diabetes, liver disease, and kidney disease.
A better approach would be to seek out help from your primary care doctor
or a registered dietician
. They will be able to help you come up with a healthy, realistic approach that meets your needs.