Most people will experience anxious/negative feelings throughout their life, and improving how they handle them will be useful on all those occasions. I don’t know how you think you are going to prevent this from happening to you - perhaps you are thinking specifically of an anxiety disorder or other extreme?