Since it deals with human psychology it's too complex an issue to pin down to any one cause. It could be chemical due to environment or genetic, too many stressors for inadequate coping mechanisms, it can be conflicting values, conlicting goals, failure to achieve desires, or feedback loops on trauma/negative thinking which you are unable to escape from.
In latter cases, you really have to search yourself, talk to yourself about it and try to find the truth. You search for the correct pathway, find the right meme, and it is a revelation to set you straight. Be a realist, find conflicts, find absurdities. Often we're attached to absurdities and they're fine if they are minor and entertaining (like chucking about Friday the 13th) but if one or a number take on too much predominance as to harm you, then they need to be resolved and cut back down to an appropriate size, put in their place so to speak.