This must have been horrible for you and your little boy i'm so sorry

I am not a vet but it does sound like he has had a seizure from what you are saying. Bailey my little yorkie has seizures too. His little body goes all stiff and he rolls on to his back with his paws in the air shaking and not responding to me, bailey also foams from the mouth. When he comes out of the seizure he walks around circles and does not have a clue what is going on he then goes potty. Did you little one go to the toilet after? bailey also gets really hyper about 10mins after the seizure did your little one do this? Defo take him to the vet and see what he says. I hope its nothing to serious and its a one off. good luck hun xxx