Let

- $(\Omega,\mathcal A)$ be a measurable space;
- $(E,\mathcal E)$ be a measurable space with $\{x\}\in\mathcal E$;
- $(Y_t)_{t\ge0}$ be an $(E,\mathcal E)$-valued time-homogeneous Markov process on $(\Omega,\mathcal A)$;
- $\operatorname P_x$ be a probability measure on $(\Omega,\mathcal A)$ with $$\operatorname P_x[Y_0=x]=1$$ for $x\in E$;
- $\rho:E\to[0,\infty)$ be $\mathcal E$-measurable and $$M_t:=\exp\left(-\int_0^t\rho(Y_s)\:{\rm d}s\right)\;\;\;\text{for }t\ge0;$$
- $$(Q_tf)(x):=\operatorname E_x\left[M_tf(Y_t)\right]$$ for $x\in E$, bounded $\mathcal E$-measurable $f:E\to\mathbb R$ and $t\ge0$.

Let $A$ denote the generator of $(Y_t)_{t\ge0}$. We easily see that the generator $B$ of $(Q_t)_{t\ge0}$ is given by $$(Bf)(x)=\lim_{t\to0+}\frac{(Q_tf)(x)-f(x)}t=(Af)(x)-f(x)\rho(x)\tag1$$ for all $x\in E$ and bounded $\mathcal E$-measurable $f:E\to\mathbb R$.

Now let $\xi$ be an exponentially ditributed (with parameter $1$) random variable on $(\Omega,\mathcal A)$, independent of $Y$, and $$\tau:=\inf\left\{t\ge0:\int_0^t\rho(Y_s)\:{\rm d}s\ge\xi\right\}.$$ Furthermore, assume that $\pi(x,\;\cdot\;):=\operatorname P_x$ for $x\in E$ is a Markov kernel and let

- $(Y^0,\tau^0)$ be a realization of $(Y,\tau)$ with $Y_0=x$;
- $\mu$ be a probability measure on $(E,\mathcal E)$;
- $(Y^n,\tau^n)$, $n\in\mathbb N$, be independent identically distributed realizations of $(Y,\tau)$ with $Y_0\sim\mu$ under $\operatorname P_\mu:=\mu\pi$.

How can we show that the generator $C$ of $$X_t:=\sum_{n=0}^\infty1_{[T^n,\:T^{n+1})}(t)Y^{n}_{t-T_n}\;\;\;\text{for }t\ge0,$$ where $T^n:=\sum_{i=0}^{n-1}\tau^i$ for $n\in\mathbb N_0$, is given by $$(Cf)(x)=(Af)(x)+\rho(x)\int (f(y)-f(x))\:\mu({\rm d}y)\tag2$$ for all $x\in E$ and bounded $\mathcal E$-measurable $f:E\to\mathbb R$?

Most probably (but I don't know) the domain of $C$ (or of $A$) is not the whole space of bounded $\mathcal E$-measurable functions (equipped with the supremum norm) and maybe we need to impose some regularity assumptions. But even with that in mind, what is the formal (not necessarily rigorous) way to obtain $(2)$?