  Let $(X,\mathcal H)$ be a $\mathcal P$-harmonic space and assume for
simplicity that constants are harmonic. Given a numerical function $\varphi$ on
$X$ which is locally lower bounded, let \begin{equation*}
  J_\varphi(x):=\sup\{\int^\ast \varphi\,d\mu(x)\colon \mu\in \mathcal
J_x(X)\}, \qquad x\in X, \end{equation*} where $\mathcal J_x(X)$ denotes the
set of all Jensen measures $\mu$ for $x$, that is, $\mu$ is a compactly
supported measure on $X$ satisfying $\int u\,d\mu\le u(x)$ for every
hyperharmonic function on $X$. The main purpose of the paper is to show that,
assuming quasi-universal measurability of $\varphi$, the function $J_\varphi$
is the smallest nearly hyperharmonic function majorizing $\varphi$ and that
$J_\varphi=\varphi \vee \hat J_\varphi$, where $\hat J_\varphi$ is the lower
semicontinuous regularization of $J_\varphi$. So, in particular, $J_\varphi $
turns out to be at least "as measurable as" $\varphi$.
  This improves recent results, where the axiom of polarity was assumed. The
preparations about nearly hyperharmonic functions on balayage spaces are
closely related to the study of strongly supermedian functions triggered by
J.-F. Mertens more than forty years ago.
