The integral in the Mellin transform runs from 0 to infinity, so you'll run into convergence issues with your choice of f(x). See
http://mathworld.wolfram.com/MellinTransform.html
Note that the example involving the Zeta function has this J(x) function, which is zero if x<2, so there's no harm in changing the lower limit to 1.
Be careful in how you evaluate the complex integral using residues. Which residues are you including? When you apply the residue theorem to a bounded countour (say the rectangle c+iT,d+iT,d-iT, and c-iT) and let that contour wander off to infinity (say T->infinity and d->+ or - infinity), you have to be sure that the parts of the contour you aren't interested in don't contribute (or if they do, you need to evaluate or at least bound this contribution somehow). Keep in mind that sometimes the integral involved in the inverse transform is only conditionally convergent, and by the infinite endpoints we mean the Cauchy Principle value.