Louis I have had that and worse. My heart went into Ventricular fibrillation on the mats at our 10P moon last year in May on two occurances.
It's about as scary as it can get, but in my case I knew instantly it was from years of chain smoking and abusing my body like a college student. (Hard drinking and heavy smoking non-stop)
I quit smoking on the spot and decided to reclaim my health. I had a few tests and stuff, but the doctor said that I had nothing showing up on the tests that would act as an indicator of anything. So I decided that I would jog until I couldn't jog anymore, and that's what I did for over 6 months. It helped me in a big way. My heart has gone into fibrillation again since then, once when I was jogging and once during HIIT at out JJ warmup.
Slow metered breathing will help it drop back into synch, and also (believe it or not) my doctor said that if it goes into fibrilliation and doesn't want to drop back into it's normal pattern, go to the washroom and sit on the toilet and try to take a violent crap. I kid you not. That bearing down and flexing and squeezing can help the heart drop back into it's normal pattern.
If you're going through what is most common, what is happening is the bottom half of your heart is still beating and pumping blood, but the top half is freaking out at it's own pace. The good news is that your heart is still pumping oxygenated blood because it's basically like a gravity fed pump, but you need to sit still and stay calm and try to force it back into rhythm.
I know you're not a smoker, but you don't need to be a smoker to experience this. I was told it was quite common and effects a lot of non-smokers. It is still super scary none-the-less, and I really push myself with cardio to try to raise my aerobic threshold and recover my heart health. I also started taking a Melaleuca fiber supplement called "Fiberwise" for heart health. Between that and the exercise and the jits and the good food and not smoking I haven't experienced fibrillation in a few months, knock on wood.
When I do experience it, it is usually when my heart is pounding from JJ, and then someone puts a bloodchoke on me, and my brain sends a signal to my heart screaming "WE NEED MORE BLOOD, WORK HARDER" and then my heart just spazzes out. So I try to keep calm whem I roll, so really the whole situation is going to help my jitz in the long run.
Get it looked at by a doctor and make sure that what you're going through is the common thing I described. It could be something else. If it's the common fibrillation issue, go hard cardio but stay in tune with your heart while you push yourself.