The formula for (and computation of) the inverse p-adic mellin transform So, after scouring the entirety of the internet, I managed to find one (and, so far, only one) source that actually explains how to invert the $p$-adic mellin transform:
$$\mathscr{M}_{p}\left\{ f\right\} \left(s\right)\overset{\textrm{def}}{=}\frac{p}{p-1}\int_{\mathbb{Q}_{p}^{\times}}\left|\mathfrak{z}\right|_{p}^{s-1}f\left(\mathfrak{z}\right)d\mathfrak{z},\textrm{ }\forall s\in\mathbb{C}$$
where $d\mathfrak{z}$ is the haar probability measure on $\mathbb{Z}_{p}$, and where $s$ is a complex variable. The source in question are these notes from the University of Chicago, specifically, pages 72 and 73. However, being an analyst, the word "(un)ramified" gives me heart palpitations; I'll be honest, I don't know exactly how to interpret equations (4.15) and (4.16) from the notes (pages 72 & 73), nor their accompanying text. I know just enough to know that the integral I wrote above is what the writer meant in writing (4.14).
However, because of the maddening $t$ business in the notes—among other things—I cannot understand how to correctly write down the inversion formula, among other things. Before I ask my questions, let me just say:
i. I have no interest in integrating over anything other than complex-valued functions on $\mathbb{Z}_{p}$. For what I'm trying to learn, all the business about field extensions are needless complications in these notes that I'm trying to do away with as I explain the material to myself.
ii. I have no interest in Representation theory; I'm just an analyst whose work has led him into non-archimedean waters, and would like to know what the rules are for swimming in these circumstances.
Anyhow...
Is the correct way of writing (4.15):
$$\mathscr{M}_{p}^{-1}\left\{ F\right\} \left(\mathfrak{z}\right)=\frac{1}{2\pi i}\oint_{p^{-\sigma}\partial\mathbb{D}}\frac{F\left(s\right)}{\left|\mathfrak{z}\right|_{p}^{s}}ds$$ where $p^{-\sigma}\partial\mathbb{D}$ is the circle in $\mathbb{C}$ centered at $0$ of radius $p^{-\sigma}$, and where $\sigma$ is a positive real number.
Or is it: $$\mathscr{M}_{p}^{-1}\left\{ F\right\} \left(\mathfrak{z}\right)=\frac{1}{2\pi i}\int_{\sigma-i\infty}^{\sigma+i\infty}\frac{F\left(s\right)}{\left|\mathfrak{z}\right|_{p}^{s}}ds$$ where the contour is the line $\textrm{Re}\left(s\right)=\sigma$ in $\mathbb{C}$?
Or is it: $$\mathscr{M}_{p}^{-1}\left\{ F\right\} \left(\mathfrak{z}\right)=\frac{1}{2\pi i}\oint_{p^{-\sigma}\partial\mathbb{D}}\left|\mathfrak{z}\right|_{p}^{-s}F\left(-\frac{\ln s}{\ln p}\right)ds$$
Or is it something else, entirely?
Next, as a test-run, I tried to compute and then invert the transform of the constant $\mathbb{Z}_{p}$. Like in the notes, I computed: $$\mathscr{M}_{p}\left\{ \mathbf{1}_{\mathbb{Z}_{p}}\right\} \left(s\right)=\frac{1}{1-p^{-s}}$$ where $\mathbf{1}_{\mathbb{Z}_{p}}$ is the indicator function for $\mathbb{Z}_{p}$. This is the same as the notes, albeit they use $t=p^{-s}$ and write this as $\frac{1}{1-t}$.
However, when I try to use either of the above two attempts at interpreting the inversion formula (4.15), I end up with gobbledygook.
• The first formula I gave yields the constant function $$f\left(\mathfrak{z}\right)=\frac{1}{\ln p}$$
• The second formula yields (using the residue theorem): $$f\left(\mathfrak{z}\right)=\frac{1}{\ln p}\sum_{k\in\mathbb{Z}}\left|\mathfrak{z}\right|_{p}^{-\frac{2k\pi i}{\ln p}}=\frac{1}{\ln p}\sum_{k\in\mathbb{Z}}e^{2k\pi i\textrm{val}_{p}\left(\mathfrak{z}\right)}$$ which is always divergent.
• The third formula yields $f\left(\mathfrak{z}\right)=0$, because the integrand: $$\left|\mathfrak{z}\right|_{p}^{-s}F\left(-\frac{\ln s}{\ln p}\right)=\frac{\left|\mathfrak{z}\right|_{p}^{-s}}{1-p^{--\frac{\ln s}{\ln p}}}=\frac{\left|\mathfrak{z}\right|_{p}^{-s}}{1-s}$$ is holomorphic inside the unit disk.
None of these seem right to me, which makes me worry that none of the inversion formulae I've proposed are correct.
As such, I ask:
(1) What is the correct formula for the inversion of the $p$-adic mellin transform?
(2) What is the procedure for evaluating said integral? (Ex. Do I use the residue theorem, but ignore the existence of certain poles—if so, which ones?)
(3) More generally, given an $f:\mathbb{Z}_{p}\rightarrow\mathbb{C}$ so that the integral: $$F\left(s\right)=\int_{\mathbb{Z}_{p}\backslash\left\{ 0\right\} }\left(f\left(\mathfrak{z}\right)\right)^{s}d\mathfrak{z}$$ exists and has an analytic continuation to a meromorphic or entire function of $s\in\mathbb{C}$, how would I go about inverting it to re-obtain $f$? What would be the inversion formula, are there any special cares I should take in computing it (ignoring certain singularities when computing residues, etc.)? And to what extent can I re-obtain $f$ in this way?
To anyone who has read this far: thank you very much for your time! 
 A: In those notes, taking $F = \mathbf Q_p$, the scary term "unramified character" of $\mathbf Q_p^\times$ means a continuous homomorphism $\chi \colon \mathbf Q_p^\times \rightarrow \mathbf C^\times$ that is trivial (equal to $1$) on the units $\mathbf Z_p^\times$. The simplest example of such a character is the $p$-adic absolute value: $x \mapsto |x|_p$. This is continuous on $\mathbf Q_p^\times$ and it is definitely trivial on $\mathbf Z_p^\times$ since those are exactly the $p$-adic number of $p$-adic absolute value 1.  A complex power $x \mapsto |x|_p^s$ for $s \in \mathbf C$ is also an unramified character of $\mathbf Q_p^\times$, and he is saying all unramified characters of $\mathbf Q_p^\times$ look like this for some $s$.  Why is that?
Every nonzero $p$-adic number has the form $p^nu$ for some $n \in \mathbf Z$ and $u \in \mathbf Z_p^\times$. For an unramified character $\chi$ of $\mathbf Q_p^\times$, we have $\chi(u) = 1$, so $\chi(p^nu) = \chi(p^n) = \chi(p)^n$.  The number $\chi(p)$ is in $\mathbf C^\times$, so we can write $\chi(p)$ as $1/p^s$ for some $s \in \mathbf C$. (This $s$ is not unique, but is well-defined up to adding an integer multiple of $2\pi i/\log p$ on account of looking at the complex solutions $s$ to $p^s = 1$.)  Then $\chi(p^nu) = \chi(p)^n = (1/p^s)^n = (1/p^n)^s = |p^nu|_p^s$, so $\chi(x) = |x|_p^s$ for all $x \in \mathbf Q_p^\times$: $\chi$ is the $s$-th power of the basic unramified character $x \mapsto |x|_p$, where
$s$ satisfies $\chi(p) = 1/p^s$.  When a homomorphism $\mathbf Q_p^\times \rightarrow \mathbf C^\times$ is trivial on $\mathbf Z_p^\times$, it is continuous since it is locally constant (it is constant near 1 and a homomorphism) and is completely determined by its value at $p$.
The value of $\chi(p)$ can be arbitrary in $\mathbf C^\times$: for each $t \in \mathbf C^\times$ set $t = 1/p^s$ for some $s \in \mathbf C$ and define $\chi_t \colon \mathbf Q_p^\times \rightarrow \mathbf C^\times$ by the rule $\chi_t(p^nu) = t^n$ for $u \in \mathbf Z_p^\times$ and $n \in \mathbf Z$. This is a homomorphism, its value at $p$ is $t$, it is trivial on $\mathbf Z_p^\times$ ($\chi_t$ is "unramified"), and it is continuous since it is locally constant. Since $\chi_t(p^nu) = t^n = (1/p^s)^n = (1/p^n)^s = |p^nu|_p^s$, we have $\chi_t(x) = |x|_p^s$ for all $x \in \mathbf Q_p^\times$. This is why he says for each $t \in \mathbf C^\times$ there is a unique unramified character $\chi$ of $\mathbf Q_p^\times$ with $\chi(p) = t$: that $\chi$ is $\chi_t$.
The connected components of the group of characters $\Omega(\mathbf Q_p^\times)$ are entirely determined by how the characters look on $\mathbf Z_p^\times$: two characters of $\mathbf Q_p^\times$ are in the same connected component exactly when they are equal on $\mathbf Z_p^\times$, and by continuity a character $\mathbf Z_p^\times \rightarrow \mathbf C^\times$ is trivial on some neighborhood $1 + p^n\mathbf Z_p$ of 1 (a subgroup!) since $\mathbf C^\times$ has no subgroup in a neighborhood of 1 other than $\{1\}$. Therefore a character on $\mathbf Z_p^\times$ is a homomorphism to $\mathbf C^\times$ on some quotient group $\mathbf Z_p^\times/(1 + p^k\mathbf Z_p)\cong (\mathbf Z/p^k\mathbf Z)^\times$, which is finite. Going the other way, for each homomorphism $(\mathbf Z/p^k\mathbf Z)^\times \rightarrow \mathbf C^\times$ we can lift it to a character $\eta$ on $\mathbf Z_p^\times$ using the composite map 
$$
\mathbf Z_p^\times \rightarrow \mathbf Z_p^\times/(1+p^k\mathbf Z_p) \cong (\mathbf Z/p^k\mathbf Z_p)^\times \rightarrow \mathbf C^\times
$$ 
(this is automatically continuous since it is a homomorphism and it is trivial on the neighborhood $1 + p^k\mathbf Z_p$ of 1) and then we can multiply this by an unramified character $\chi$ to get a character of $\mathbf Q_p^\times$: $p^nu \mapsto \chi(p)^n\eta(u)$.  In other notation, since unramified characters of $\mathbf Q_p^\times$ are just complex powers $|\cdot|_p^s$, each character of $\mathbf Q_p^\times$ is $|\cdot|_p^s\eta$ where $s \in \mathbf C$ and $\eta$ is a character of $\mathbf Z_p^\times$: each connected component can be labeled by the common $\eta$ (restriction to $\mathbf Z_p^\times$) for all characters in that component. (The choice of $s$ for a character really is in $\mathbf C/(2\pi i/\log p)\mathbf Z$, a cylinder, which topologically is the same as $\mathbf C^\times$ using $s + (2\pi i/\log p)\mathbf Z \mapsto 1/p^s$.)
For $x \in \mathbf Q_p^\times$, written as $p^nu$ where $n \in \mathbf Z$ and $u \in \mathbf Z_p^\times$, write $u$ as $u_x$ to indicate its dependence on $x$. Then 
for each character $\eta$ of some $(\mathbf Z/p^k\mathbf Z)^\times$ and $s \in \mathbf C$, we get a character $\chi$ of $\mathbf Q_p^\times$ by $\chi(x) = |x|_p^s\eta(u_x\bmod p^k)$. (Note that $\eta(p)$ makes no sense.) All characters of $\mathbf Q_p^\times$ look like this.
Prop. 4.6 is about continuous functions $\mathbf Q_p^\times \rightarrow \mathbf C$ with compact support. Note that your test-run example of the characteristic function of $\mathbf Z_p$, viewed as a function on $\mathbf Q_p^\times$ by taking $0$ out of its domain, does not have compact support in $\mathbf Q_p^\times$: the set $\mathbf Z_p - \{0\}$ is not compact in $\mathbf Q_p^\times$ just as $(0,1]$ and $[-1,1] - \{0\}$  are not compact in $\mathbf R^\times$. Therefore this is not a good example for a test-run for Prop. 4.6 (unlike Prop. 4.7).
For a better choice of test-run for Prop. 4.6, let $\xi_A$ be notation for the characteristic function of a set $A$ (1 if the variable is in $A$ and 0 otherwise). For $a \in \mathbf Q_p^\times$ and $n \in \mathbf Z$ chosen large enough so that $|a|_p > 1/p^n$, set  $\phi = \xi_{a + p^n\mathbf Z_p}$: this is the characteristic function of the ball $a + p^n\mathbf Z_p$, which is a subset of $\mathbf Q_p^\times$ since we can't have $a + p^nx = 0$ for $x \in \mathbf Z_p$, as $|p^nx|_p \leq 1/p^n < |a|_p$. (If you don't like the characteristic function of a general ball in $\mathbf Q_p$ not containing $0$, consider the special case $a = 1$: $\xi_{1 + p^n\mathbf Z_p}$ for $n \geq 1$.)
Letting $|a|_p = 1/p^m$, so $m<n$, the Mellin transform $(M\phi)(\chi)$ of a character $\chi$ of $\mathbf Q_p^\times$ is the following integral 
$$
(M\phi)(\chi) = \int_{\mathbf Q_p^\times} \xi_{a + p^n\mathbf Z_p}(x)\chi(x)d^\times x,
$$
where I write $d^\times x$ for the (multiplicative) Haar measure on $\mathbf Q_p^\times$ that you write as $p/(p-1) dx/|x|_p$. It is the Haar measure on $\mathbf Q_p^\times$ that gives the compact open subgroup $\mathbf Z_p^\times$ measure 1.  After some calculation that I omit (tell me if you can work this out), we get 
$$
(M\phi)(\chi) = \chi(a)\int_{1 + p^{n-m}\mathbf Z_p} \chi(y)d^\times y,
$$
which is $\chi(a)$ times the integral of the multiplicative character $\chi$ over the compact multiplicative group $1 + p^{n-m}\mathbf Z_p$. The value of this is determined by whether or not $\chi$ is trivial on $1 + p^{n-m}\mathbf Z_p$: if $\chi \not\equiv 1$ on $1 + p^{n-m}\mathbf Z_p$ then 
$$
(M\phi)(\chi) = 0,
$$
and if $\chi \equiv 1$ on  $1 + p^{n-m}\mathbf Z_p$ then 
$$
(M\phi)(\chi) = \chi(a)\int_{1 + p^{n-m}\mathbf Z_p} d^\times y = 
\frac{\chi(a)}{[\mathbf Z_p^\times:1 + p^{n-m}\mathbf Z_p]} = 
\frac{\chi(a)}{p^{n-m-1}(p-1)}.
$$
There are only finitely many connected components containing the $\chi$ where $\chi \equiv 1$ on $1 + p^{n-m}\mathbf Z_p$ since such $\chi$ are  determined on $\mathbf Z_p^\times$ (not on $\mathbf Q_p^\times$!) by their values on $\mathbf Z_p^\times/(1 + p^{n-m}\mathbf Z_p)$, which is a finite group (so it has only finitely many homomorphisms to $\mathbf C^\times$).  Thus $M\phi$ is a "polynomial" in the sense defined above Prop. 4.6.
I have not yet addressed your question about the Mellin inversion formula.  Consider this a partial answer so far. I will save what I have written and come back to this later.
A: Edit:
The inversion of $F(s)$, in your notation is 
$$f(x) = \frac{\mathrm{ln}(p)}{2 \pi i} \int_{ \{ s=ir \ : r \in (-\pi/\mathrm{ln}(p), \pi/\mathrm{ln}(p)] \}} F(s)|x|^{-s} ds = \frac{\mathrm{ln}(p)}{2 \pi i} \int_{ \{ s=ir \ : r \in (-\pi/\mathrm{ln}(p), \pi/\mathrm{ln}(p)] \}} F(s)p^{\mathrm{val}(x)s} ds$$
Here if $x=p^nu$ where $u \in \mathbb{Z}_p^{\times}$ is a unit $\mathrm{val}(x)=n$. You can evaluate this integral in the normal way, you don't ignore poles. It seems like the closest answer you got was the constant $\frac{1}{\mathrm{ln}(p)}$, but this is incomplete because $f(x)$ is not supported on $\mathbb{Q}_p^{\times}$ but rather on $\{ \mathrm{val}(x) \geq 0 \} $. You can see this because in the series expansion of the rational function $\frac{1}{1-p^{-s}} = 1 + p^{-s}+p^{-2s} + \cdots $ the terms consist of polynomials in the variable $p^{-s}$ and each integral $\int_{ \{ |s|=1 \} } p^{-ns}|x|^{-s}$ is non-zero only when the valuation of $x$ is $n$ for $n \geq 0$. Finally the $\mathrm{ln}(p)$ terms just comes to account for the fact that we are parametrizing the complex circle by $r \mapsto p^{-ir}$ so as to give complex circle measure $1$. 
=================
It is helpful to state things first in terms of abstract harmonic analysis on locally compact abelian (=LCA) groups might make things clearer.
For any LCA group $A$ let $\widehat{A}$ be the group of it's unitary characters. If $f$ is a function on $A$ it's Fourier transform is $\chi \mapsto \widehat{f}(\chi) = \int_{A} f(x)\chi^{-1}(x)dx$ with $dx$ a fixed Haar measure on $A$. My Pontryagin duality is a unique measure $d\chi$ on the LCA group $\widehat{A}$ dual to $dx$ satisfying the Fourier inversion
$$
f(e) = \int_{\widehat{A}} \widehat{f}(\chi) d\chi
$$
$$
f(y) = \int_{\widehat{A}} \widehat{f}(\chi)\chi(y) d\chi
$$
$\mathbb{Q}_p^{\times}$ is your abelian group, under multiplication. It's Pontryagin dual is the space of unitary complex characters $ \widehat{\mathbb{Q}_p} =\{ \chi: \mathbb{Q}_p^{\times} \to \mathbb{T} \}$ with $\mathbb{T}$ the complex circle. For any smooth compactly supported function on $\mathbb{Q}_p^{\times}$ it's abstract Fourier transform is the Mellin transform $\widehat{f}(\chi) = \int_{\mathbb{Q}_p^{\times}} f(x) \chi(x) dx$
Because $\mathbb{Q}_p^{\times} = \mathbb{Z}_p^{\times} \times p^{\mathbb{Z}}$ it's unitary dual is $\widehat{\mathbb{Z}_p^{\times}} \times \widehat{\mathbb{Z}}$. The unramified characters are the characters which are trivial on $\mathbb{Z}_p^{\times}$, i.e. they are restrictions to $\{ 1 \} \times \widehat{\mathbb{Z}}$. The unitary characters of $\mathbb{Z}$ can be identified with unit norm complex numbers $\mathbb{T} = \{ |z|=1 \}$. The complex parameter refers to the exponent $s$ in the unitary character determined by $ | \cdot |^{s}:p \mapsto |p|_{p}^s=p^{-s}$ (or however you want to normalize it, but this is natural for number theory). To conform with Ngo's noration let us make a change of variables $t = p^{-s}$ and call this unitary character $\chi_t$. So we should think of the function "$\frac{1}{1-p^{-s}}$" more precisely as a function $L$ on the space of unitary characters:
$$\chi_t \mapsto L(\chi_t) = \frac{1}{1-\chi_t(p)}$$ if $\chi_t$ is an unramified chatacter
$$ \eta \mapsto L(\eta) = 0 $$ If $\eta$ is not unramified.
The dual measure $d\chi_{t}$ is always a Haar measure on the unitary dual, which in our case is $\mathbb{T}$, so is a multiple of $dt/t$. Explicitly it looks like $\frac{\mathrm{ln}(p)}{2\pi i} \frac{dt}{t}$ (because the contour is over a parameter between $\frac{-\pi}{\mathrm{ln}(p)} $ and $\frac{\pi}{\mathrm{ln}(p)}$).
We can write $L(\chi_t) = \chi_{t}(e) + \chi_{t}(p) + \chi_{t}(p^2) + \cdots = \chi_{t}(e) + l_p \chi_{t}(e) + l_{p^2} \chi_{t}(e) + \cdots$ where $l_p$ is translation by $p$. Strictly speaking this is not a polynomial function on the space of unitary characters but a rational one, but formally we can do everything for the terms in the sum and then take a limit.
Thus it is enough to Mellin-invert the function $\widehat{f_0}: \chi_t \mapsto \chi_{t}(e) = 1$ and deduce the rest of it by translating. Using the Fourier inversion formula and the fact that $\widehat{f_0}$ is supported on $\mathbb{Z}_p^{\times}$-invariant characters implies that $f_0$ is $\mathbb{Z}_p^{\times}$-invariant. Thus it is enough to know it's value on $\mathbb{Z}_p^{\times}$ and it's translates $p^n\mathbb{Z}_p^{\times}$.
$$f_0(e)=\mathrm{const} \int_{ |t|=1 } \chi_t(e) \frac{dt}{t} = \mathrm{const} \int_{ |t|=1 } 1 \frac{dt}{t}$$
Thus $f_0(\mathbb{Z}_p^{\times})=1$. Arguing by translation by either $p$ or $p^{-1}$ we obtain 
$$f_0(p) = \mathrm{const} \int_{ |t|=1 } \chi_t(p)\frac{dt}{t} = \int_{ |t|=1 } dt=0$$ or 
$$f(p^{-1}=\mathrm{const} \int_{ |t|=1 } \chi_t(p^{-1})\frac{dt}{t} = \int_{ |t|=1 } t^{-2}dt =0.$$
So $f_0 = 1_{ \mathbb{Z}_p^{\times}}$. 
Arguing similarly with $\chi_{t} \mapsto l_p(\chi)(e)$ produces a function $f_{1}$ such that $l_p(f)(\mathbb{Z}_p^{\times}) =1$ and is invariant under and supported in $\mathbb{Z}_p^{\times}$. In other words it is the characteristic function of the coset $p \mathbb{Z}_p^{\times}$. And so on for the rest of the terms. Adding them all up yields $ \sum_n f_n = 1_{\mathbb{Z}_p - \{ 0 \}}$ as exepcted.
