Q1: Can one define the operator $p(x,T)$ (with $T=d/dx$) using the Cauchy integral formula?
That will not work, for example, take $p(x,T)=Tx-xT=1$, but $$p(x,T) = \oint_{C} p(x,z)(zI-T)^{-1}dz= \oint_{C} (zx-xz)(zI-T)^{-1}dz=0\neq 1.$$
Since the Cauchy integral formula is ignorant of commutation relations, it cannot be applied to non-commuting $x$ and $T$.
Q2: Is there some other way to compute the action of $p(x,T)$ on a (smooth) function $f(x)$?
This problem is a common one in physics. A generic way to proceed is to discretize the $x$ variable in $N$ points, and then to replace the differential operator $T$ by finite differences. The function $p(x,T)$ is represented by an $N\times N$ matrix, and the operation $p(x,T)f(x)$ can be carried out with $N^2$ operations.
An alternative, possibly more efficient method, is the socalled split-operator approach, for $p$ of the form $p(x,T)=\exp[A(x)+B(T)]$. One then starts from the Trotter formula $$e^{A+B} = \lim_{n \rightarrow \infty} (e^{A/n}e^{B/n})^n$$ and inserts Fourier transform operations ${\cal F}$, $$e^{A(x)+B(T)}f=\lim_{n \rightarrow \infty} (e^{A/n}{\cal F}^{-1}e^{\tilde{B}/n}{\cal F})^n f,\;\;\tilde{B}={\cal F}B{\cal F}^{-1}.$$ The operators $A$ and $\tilde{B}$ are both diagonal, so they act on a function simply by multiplication. The time consuming step is the Fourier transform, if $f$ is discretized in $N$ points that operation takes a time that scales as $N\log N$. The total computation scales as $nN\log N$, which for $n\ll N$ improves on the $N^2$ scaling of the generic method.