Conditions on transformation function in Monte Carlo expectation If I have an i.i.d. set of samples $\theta_1, \ldots, \theta_n$ from my posterior $p(\theta | y)$ then:
$$
\mathbb{E}[f(\theta) | y] = \int f(\theta) p(\theta | y)\, \mathrm{d}\theta \approx \frac{1}{n} \sum_{i=1}^{n} f(\theta_i)
$$
where the approximation becomes more accurate as $n \rightarrow \infty$ by the strong law of large numbers.
Question:
Are there any conditions on the function $f$ other than it must be specified so that the integral exists?
 A: "Are there any conditions on the function f other than it must be specified so that the integral exists?"
Basically, the condition on the function f such that the integral exists is that f is a function such that the integral exists.  That sounds circular, and it is.  f must be Lebesgue integrable with respect to the probability measure d$P(\theta|y)$. If it is, the mean $\mathbb{E}[f(\theta) | y] $ exists, and the Strong Law of Large Numbers holds, i.e.,
$$ P\left(\left.\lim_{n \rightarrow \infty}   \frac{1}{n} \sum_{i=1}^{n} f(\theta_i) = \mathbb{E}[f(\theta) | y] \right|y\right) = 1 $$
Put another way, the integral exists iff the mean exists.  That's a tautology.  However, that the Strong Law of Large Numbers holds when the mean exists is by no means an obvious or trivial statement.
If $\theta|y$ had a Cauchy distribution, the mean, i.e., integral, would not exist, the Strong Law of Large Numbers would not apply, and indeed, the average of an arbitrary number of samples would have the same distribution as any one sample.
