A Brahmin Priest once asked the
Blessed Buddha:
Master Gotama, what is the cause of being unable to
remember something
that has been memorized over a long period and also
that, which has not
been memorized?
Brahmin, when the mind is agitated by restlessness and
regret, stressed,
stirred, troubled and tyrannized by restlessness and
regret, and one does
neither know, nor understand any actual safe escape from
this dominating
restlessness and regret, in that moment, then one can
neither see, nor ever
understand what is advantageous, neither for oneself,
nor for others, nor
for both oneself and for others. Then, consequently,
even texts, that have
been memorized long, cannot be remembered. Why is this
blind neglect so?
Imagine a bowl of water with the surface stirred up by
wind into ripples,
undulations, and small wavelets. If a man with good
eye-sight were to inspect
the reflection of his own face in it, he would neither
see, nor recognize it,
as it really is! So too, brahmin, when the mind is
distracted by restlessness
and regret, excited, anxious, distressed, worried,
perturbed and upset by
restlessness and regret, on any such occasion even texts
long memorized
do not recur to the mind, not to speak of those texts,
events and knowledge,
that have not been memorized at all...
On how to prevent Restlessness
and Regret (=curable anxiety):
Frequent systematic attention both to bodily and mental
Tranquillity like this
At the very moment restlessness is identified, then
repeat this verbal device:
“There is calm of the body, and there is calm of the
mind...”
and then note the reduced, if not vanished, agitation.
https://What-Buddha-Said.net/drops/II/Curing_Restlessness_and_Regret.htm