Removing dents from oil pan

I just lay something like that on a concrete floor, find a 2x4 and pound the dents out using that and a hammer.
I apologize for the stupid question, but I’m hitting the pan with the wood driven by the hammer?