Epicurus taught that ataraxia was vitally important for the both the pleasure that a calm, anxiety-free mind brings itself BUT ALSO that it allows the enjoyment of other pleasures - both necessary and extravagant - in our lives more fully.
AND ALSO ataraxia helps us prudently prepare for or react to painful circumstances, rather than allowing fear or anger to dictate our actions.
There is basically no situation in which anxiety is more useful than a calm presence of mind.