There's several possibilities that might be the cause:
1. Brain chemistry, nutrient deficiency. Eat less sugar and junk foods, eat more natural unprocessed foods.
2. Karma due to participating in immorality. Watching porn will destroy your mental health and send you into psychological hell. Vulgar, violent, aggressive music also has negative karmic consequences on one's psychological health. Try listening to Mozart or other easy going music. Overall, try to keep your life rated pg and things will get better.