Psychological or possibly medical disorders. There is a whole branch of clinical practice to deal with this. It might or might not help, but it probably beats asking the internet.
Without more information, it's hard to say. Medical conditions like thyroid disorders, or substance use could play a role. Psychologically, those symptoms could be attributed to anxiety or trauma related disorders. You may find it helpful to start by keeping notes about when/where/etc these bouts occur, as there may be underlying patterns that you haven't noticed yet. I would recommend doing some reading on "emotional flashbacks" and consider whether you relate to what you find