Mind is the forerunner of all mental states. Happy states and sad states are preceded by our thoughts.
Our thinking is habituated. We all have a certain way of thinking. If we have good thinking habits, we benefit from it. Conversely, if we have bad thinking habits, we suffer from it.
To change our thinking habits, we must first be aware of our thoughts. Awareness must come first, before change is possible.
For more, read the 5 Fundamental Spiritual Truths.