How to handle the potential $V(x)$ or $V(\phi)$ which is not analytic in QM and QFT In QM, 
 $$\hat{x}\phi(p)=i\frac{\partial}{\partial p} \phi(p)$$
and when $V(x)$ is an analytic function of $x$, then
$$V(\hat{x})\phi(p)=V(i\frac{\partial}{\partial p} )\phi(p)$$
and we can do Taylor expansion of $V$ and it is well-defined.
While what happened when $V(x)$ is not an analytic function? For example, $V(x)=e^{-\frac{1}{x^2}}$, it's a well-behaved and smooth potential and has no singularity, so it is physical. It have only Laurent series, while how to handle
$$\frac{1}{\hat{x}}\phi(p)$$
In QFT, we need to replace $V(\phi)$ to $V(-i\frac{\delta}{\delta J})$. The same problem happens when $V(\phi)$ is not analytic. How to resolve this problem?
 A: The right way to deal with functions of operators is via the Spectral Theorem. If you have a self-adjoint (or even normal) operator $T$, the spectral theorem states that there is a resolution of the identity $E_T(t)$ such that the operator can be written as
$$T=\int_\Bbb{R} t dE_T(t)$$
So, given a measurable function $f$, not nedded to be analytic, we define
$$f(T)=\int_\Bbb{R} f(t) dE_T(t)$$
For the case of self adjoint operators with purely discrete spectrum, e.g. harmonic Hamiltonian, we can write this integral as a series:
$$T=\sum_i\lambda_iP_i$$
where $P_i$ is the projection on the eigenspace of the eigenvalue $\lambda_i$. In this case we have
$$f(T)=\sum_if(\lambda_i)P_i$$
For operators with continuous spectrum, we must mantain the integral representation. What is usually done is to use the basis for which the operator is diagonal, i.e. it is written as a multiplication operator, what is always possible for self-adjoint operators. For example, if you are in the momentum representation and wants to deal with a funciton of the position operators, such as a potential $V(\hat{x})$, you can use the inverse Fourier transform $\mathcal{F}^{-1}$ to change for the position representation and apply $V(x)$ simply as a multiplication and then return to the momentum basis via a Fourier transform $\mathcal{F}$:
$$V(\hat{x})\phi(p)=\mathcal{F}V(x)\mathcal{F}^{-1}\phi(p)=\mathcal{F}V(x)\check{\phi}(x)=\widehat{V\check{\phi}}(p)$$
where $\hat{f}$ and $\check{f}$ are the Fourier transform and inverse transform of $f$, resp.
A: Good question. There are two ways of defining operator functions, which often coincide.
1) As you said, given an analytic function $V(x)=\sum_n V_n \, x^n$ of the scalar $x$ which converges for all $x$ (as $V$ is analytic), you can define the corresponding operator for that potential using the same series expansion, but now with the operator series expansion with the same coefficients $V_n$ 
$$\hat V = \sum_n V_n \; \hat x^n.$$
As you point out, this series does not converge outside the convergence radius if the function $V(x)$ is not analytic. Note that, loosely speaking, this procedure applies to all operators, $\hat x$ does not need to be Hermitian, but not all potentials.
Now to your question: What can we do if $V(x)$ is not analytic? This already applies to some very simple, common examples in QM, such as a particle in a square well (which is not analytic), or the hydrogen atom potential.
2) One can also define operator functions for arbitrary functions, but restricting the operators to normal operators. What is a normal operator? $A$ is called normal if $[A, A^\dagger]=0$. Why is this important? $A$ possesses an orthonormal basis of eigenstates if and only if $A$ is normal. This means that the adjoint operator $A^\dagger$ leaves each eigenspace of $A$ invariant and one can iteratively decompose the entire space into eigenspaces. For example, Hermitian and unitary operators are subclasses if normal operators.
In this case, if we decompose $\hat A=\sum_n \lambda_n | n \rangle \langle n|$, we can simply define any function of the operator $$\hat V=V(\hat A):= \sum_n V(\lambda_n) | n \rangle \langle n| $$ via its eigenvalues and eigenstates.
Or specifically, for your continuous case, one would have
$$\hat V= \int dx \; V(x) | x \rangle \langle x|$$.
It is easy to show that if $A$ is normal and if $V(x)$ is analytic, these two definition coincide.
