You don’t….
What causes feedback is the mic picking up the sound coming through the speakers, which it amplifies, which comes out the speakers, etc…. thus the term “feedback”
Hooking up an overdrive pedal to a mic is kind of like throwing gasoline on a fire.
You can reduce feedback by placing the mic behind the speakers and by using your EQ to cut out the particular frequencies that are most prone to feeding back (which depends on the room itself, placement of the speakers, characteristic of the microphone, position of planetary alignment, butterfly wings flapping in china, sunspot activity, etc….)