Suppose I want to optimise the function $$f\mapsto \int_\mathbb{R}e^{f(x)}\mathrm{d}x$$ with respect to $f$, where $f$ is concave and twice continuously differentiable. Is there some result that allows me to do this? Perhaps with some additional conditions on $f$? (E.g., only consider functions $f$ such that $f(x) \leq M$ for all $x\in\mathbb{R}$ and some $M \in (0,\infty)$).
Since the integral is with respect to $x$ and not $f$, I cannot use the fundamental theorem of calculus, and since the optimisation is over a function space I cannot use the Leibniz integral rule.
Without constraints such as $f\le M$, this is a problem in the calculus of variations. It has Lagrangian $e^f$ and Euler-Lagrange equation $e^f=0$, with no solution (unless you count $f=-\infty$, but given your stated conditions it sounds like you don't).
This is not surprising at all. For example, the choice $f=-kx^2$ makes the integral $\sqrt{\pi/k}$, which no finite $k>0$ minimizes. But the result can be made arbitrarily close to $0$, which is clearly unobtainable for $f>-\infty$.
Similarly, any finite constant $f$ makes the integral infinite, so we can't give the integral a finite maximum even with the constraints you propose.