Sometimes when things are not going right in our lives we tend to forget all the good things in our life. An example from my life, I worked very hard to get a promotion at my job. Once I didn't get the promotion, I went down the negative path telling myself that my life sucks, I am hopeless and I have nothing good happening in my life.
Given that I have read many books from Wayne Dyer, Abraham hicks, Gabrielle Bernstein etc, they all say the minute we feel this way - start counting all the things you are already grateful for in your life so I started listing down everything I am grateful for and it turned out when I finished with my list - I had over 40 items on it including how lucky I am to have such a flexible job (Note : a few minutes earlier I was complaining about the same job - that I didn't get a promotion). It made me so grateful to see this list that my heart was immediately filled with gratitude. I felt blessed.
It is always good to start or end your day thanking the universe for all that you are grateful for in life. I know sometimes we cannot do our gratitude list everyday but if you could try to make this a daily practice or do it every other day, this will help tremendously in positive thinking and attracting what we want in our lives.