According to Dr. Breuning, writing in Getting Past the Stress of Feeling Slighted:

You can build a new neural pathway in six weeks. You can give the electricity in your brain an alternative place to flow. Every time you find yourself pondering a social disappointment, just shift your attention to another thought. A new pathway will build if you do this every day without fail for six weeks. Beyond Cynical: Transcend Your Mammalian Negativity