Please I need some advice

So, one year ago I was diagnosed with a depression (it was in the beginning of it) and I started taking some meds to cure this... I still take those pills today and I don’t have those symptoms anymore, I feel great with myself and it’s been 2 years that I’m not trying to commit suicide...

But recently I had one type of attacks that happens when I am mad or sad... has my first time suffering from something like this... today I had one of those again.. it happened so fast and I couldn’t control myself... I start crying so much and I keep remembering all those sad things that happened in my life before... it dures 10 to 20 minutes and it’s awful, my legs shake, my hands stay in my face and I cry a lot!! IDK what it is and I don’t want to have this things anymore... I’m trying to figure out how to control myself in these situations...

IDK why I’m sharing this... but it would be great if you give me some advice...