Suppose $X_1,X_2,\ldots,X_n$ are i.i.d $\text{Poisson}(\theta)$ where $\theta$ has a Gamma prior. The testing problem is $H_0:\theta=\theta_0$ against $H_1:\theta\ne \theta_0$. I am trying to find the Bayes factor in favour of $H_1$.
Let $\Theta_i$ be the parameter space under $H_i$ and $\Pi(\Theta_i)=\int_{\Theta_i}\pi(\theta)\,d\theta$ where $\pi$ is the prior density, $i=0,1$. Similarly, $\Pi(\Theta_i\mid \boldsymbol x)=\int_{\Theta_i}\pi(\theta\mid \boldsymbol x)\,d\theta$ where $\pi(\theta\mid \boldsymbol x)$ is the posterior density.
My definition of Bayes factor in favour of $H_1$ is $$B=\frac{\text{Posterior odds}}{\text{Prior odds}}=\frac{\Pi(\Theta_1\mid \boldsymbol x)/\Pi(\Theta_0\mid \boldsymbol x)}{\Pi(\Theta_1)/\Pi(\Theta_0)}=\frac{\Pi(\Theta_1\mid \boldsymbol x)/\Pi(\Theta_1)}{\Pi(\Theta_0\mid \boldsymbol x)/\Pi(\Theta_0)}$$
For simple null against simple alternative, say $H_0:\theta=\theta_0$ vs $H_1':\theta=\theta_1(\ne \theta_0)$, Bayes factor is the likelihood ratio:
$$B=\frac{\pi(\theta_1\mid \boldsymbol x)/\pi(\theta_1)}{\pi(\theta_0\mid \boldsymbol x)/\pi(\theta_0)}=\frac{f(\boldsymbol x\mid \theta_1)}{f(\boldsymbol x\mid \theta_0)}$$
But how to use this definition for simple versus composite alternative as I have in the problem above?
Do I have to use a mixture prior for $\theta$ like $$\pi(\theta)=p\delta_{\theta_0}+(1-p)g(\theta)\,,$$ where $\delta_{\theta_0}$ denotes a degenerate distribution at $\theta_0$ and $g(\cdot)$ is the pdf of a Gamma distribution on $\Theta-\{\theta_0\}$? If this is the case, should the Bayes factor be modified as
$$B=\frac{\Pi(\Theta_1\mid \boldsymbol x)/\Pi(\Theta_1)}{\pi(\theta_0\mid \boldsymbol x)/\pi(\theta_0)}=\frac{\Pi(\Theta_1\mid \boldsymbol x)/\Pi(\Theta_1)}{f(\boldsymbol x\mid \theta_0)}\,\,?$$
I guess the posterior would also be a mixed distribution if I go down this road.