Hi
If there is a cavity in your tooth and is shaking with lot of pain, it indicates acute infection around the root of the teeth. Most probably you have to undergo Root Canal Treatment (RCT) following which the pain & the mobility of the tooth shall reduce.
Next Steps
Visit to the Dentist immediately.
Health Tips
Avoid biting food from same tooth and take some OTC analgesic for transient relief.