It is essential to know what to do in any given situation, to understand its relationship to oneself completely. Until I respond to a situation skillfully, I will keep replaying it in memory whenever I have nothing in the present to do. Once a situation has been addressed, it will not arise unbidden in memory ever again. It is finished.
This is the nature of memory.
Because thinking about past events where I didn't know what to do is painful, and this thinking is inevitable when I have nothing to do, I try to keep myself busy to reduce the need for painful introspection. The more our mode of living multiplies situations wherein we believe we are called to action, the more busy we require to keep ourselves to block out introspection. But keeping busy (typically) creates more opportunities for unskillful action, which increases the need for introspection, which increases the need to stay busy.
This is the nature of anxiety.
To break the chain of anxiety, two things are needed. One, the wisdom to see (i) if anything needs to be done in any situation and (ii) what it is that one should do in that situation, if action is deemed necessary. Two, skill in some activity that does not generate opportunities for unskillful action, something that is sufficiently motivating to oneself and sufficiently benign in its effects on all. By the practice of wisdom and skill, the chain of memory and anxiety is broken.
This is the nature of the way out.