Yes, affirmations can help with the pathological worry associated with anxiety.
A 2016 study, published in the Behaviour Research and Therapy journal, asked anxious people to generate positive thoughts and repeat them for one week.
Results showed that the practice was in effective in reducing uncontrollable worry.