Once you swallow gum there's no way to get rid of the swallowed gum other than waiting until the gum you swallowed passes through your stomach and through your poop.
In most cases swallowing gum will cause no harm nor should you need to see a doctor or go to the emergency room.
Unless the gum gets stuck in your throat and you're choking or having trouble breathing then the gum being swallowed is not an issue.
It usually takes 10 to 24 hours for the gum to pass through your body and leave your body through your poop.
I've swallowed gum as a kid many times before and it always just came out in my poop.
It's not good to swallow gum but swallowing gum is usually nothing to worry about.
Still you should avoid swallowing gum as your stomach cannot digest the gum.
If you feel the gum stuck in your throat some then drink some water or hot tea etc which can help push the gum out of your throat and into your stomach.
If you swallow a piece of gum, there's probably no reason to see a doctor.
The swallowed gum should pass normally through your digestive tract.
If you swallow a large amount of gum or if you swallow gum with other indigestible objects, that might cause a blockage.
This could require surgery to remove it from your digestive tract.