1. If you aren't a self help person then you might want to see a shrink.
2. If you are a self help person then learn how to meditate.
These steps are the intro of how to detect what is going on inside your head. The more you use them, the more fine tuned and accurate they will become.