Thank you both for your answers.

If you do not mind, would you comment on why thisĀ does not work? Clearly, I am still confused about Mathematica's evaluation process.

In[8]:= SetAttributes[MyResidue, HoldAll]

In[9]:= MyResidue[f_[p0_], pole] := Residue[f[p0], {p0, pole}]

In[10]:= f[p0_] := 1/(p0^2 - (wp - I*e1)^2)

In[11]:= MyResidue[f[p0], -wp + I*e1]

Out[11]= MyResidue[f[p0], -wp + I e1]

In[12]:= Trace[MyResidue[f[p0], -wp + I*e1]]

Out[12]= {}

Thanks