Utility of consumption with mortality and finite termination In [Calvo, Guillermo A., and Maurice Obstfeld. Optimal time-consistent fiscal policy with finite lifetimes. Econometrica: Journal of the Econometric Society (1988): 411-432], the authors derive
$$
\mu(b)\equiv\int_{b}^{\infty}u\left[c(b,t)\right]\left[1-F(t-b)\right]e^{-\beta(t-b)}dt
$$
as the utility of an individual where $b$ is the birth time of the individual, $c$ is their consumption, $F$ is the CDF of a random variable corresponding to the length of their life, $u$ is their utility, and $\beta$ is their discount rate.
I would like to instead study the case in which there is a terminal time $T>b$ beyond which we do not care about the individual's utility.
How can I formulate this as an integral?
 A: Calvo and Obstfeld's problem
In [Calvo, Guillermo A., and Maurice Obstfeld. Optimal
time-consistent fiscal policy with finite lifetimes.
Econometrica: Journal of the Econometric Society (1988): 411-432],
they study
$$
\mu(b) \equiv \int_{b}^{\infty}u\left[c(b,t)\right]\left[1-F(t-b)\right]e^{-\beta(t-b)}dt
$$
where $b$ is the birth time of an individual, $c$ is their consumption, $F(n)$ is the CDF of the random variable $\tilde{n}$ corresponding to the length of their life, $u$ is their utility, and $\beta$ is their discount rate.
Assumptions. $F(0)=0$, $\tilde{n}$ is absolutely continuous (with density function $f$), and $u \geq 0$. All measurability requirements for the integrals to be well-defined should also be satisfied.
The definition of $\mu(b)$ is motivated by noting that
\begin{align*}
\mathbb{E}\left[\int_{b}^{b+\tilde{n}}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right] & =\int_{0}^{\infty}\left(\int_{b}^{b+n}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right)f(n)dn\\
 & =\int_{0}^{\infty}\left(\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\boldsymbol{1}_{(t-b,\infty)}(n)dt\right)f(n)dn\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left(\int_{0}^{\infty}f(n)\boldsymbol{1}_{(t-b,\infty)}(n)dn\right)dt\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\mathbb{P}(n>t-b)dt\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[1-\mathbb{P}(n\leq t-b)\right]dt\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[1-F(t-b)\right]dt
 \equiv \mu(b)
\end{align*}
where we have used the fact that $\boldsymbol{1}_{(t-b,\infty)}(n)=1$
if and only if $t\leq b+n$ and the Fubini-Tonelli theorem for nonnegative functions to switch the order of integration (I am assuming that $u \geq 0$).
Your problem
For brevity, let $a\wedge b=\min\{a,b\}$ and $a\vee b=\max\{a,b\}$.
From my understanding, you want to study the expectation
$$
\mathbb{E}\left[\int_{b}^{T\wedge(b+\tilde{n})}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right]
$$
where there is an expiry time $T > b$ beyond which we do not care about the individual's utility from consumption.
Note that unlike the original problem, we only track the individual's utility on the time horizon $[b, T \wedge (b + \tilde{n})]$, corresponding to the time between $b$ (birth) and the smaller of $T$ (expiry) and $b + \tilde{n}$ (death).
Remark. Note that this is not the same thing as what you wrote in your original question (in fact, I was unable to understand the expectation you wrote down; we can chat about this if necessary).
One way to handle this would be to split up the expectation into two parts (one corresponding to the individual living beyond $T$ and one not).
Then, under the same assumptions as above,
\begin{multline}
\mathbb{E}\left[\int_{b}^{T\wedge(b+\tilde{n})}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right]\\
=\mathbb{E}\left[\boldsymbol{1}_{\{T\leq b+\tilde{n}\}}\int_{b}^{T}u\left[c(b,t)\right]e^{-\beta(t-b)}dt+\boldsymbol{1}_{\{T>b+\tilde{n}\}}\int_{b}^{b+\tilde{n}}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right]\\
=\boxed{\left(1-F(T-b)\right)\int_{b}^{T}u\left[c(b,t)\right]e^{-\beta(t-b)}dt+\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[F(T-b)-F(t-b)\right]dt} \tag{*} \label{eq:result}
\end{multline}
where the second expectation is obtained by a Fubini's argument as in the previous paragraph:
\begin{align*}
\mathbb{E}\left[\boldsymbol{1}_{\{T>b+\tilde{n}\}}\int_{b}^{b+\tilde{n}}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right] & =\int_{0}^{T-b}\left(\int_{b}^{b+n}u\left[c(b,t)\right]e^{-\beta(t-b)}dt\right)f(n)dn\\
 & =\int_{0}^{T-b}\left(\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\boldsymbol{1}_{(t-b,\infty)}(n)dt\right)f(n)dn\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left(\int_{0}^{T-b}\boldsymbol{1}_{(t-b,\infty)}(n)f(n)dn\right)dt\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\mathbb{P}(t-b\leq n\leq T-b)\\
 & =\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[F(T-b)-F(t-b)\right]dt.
\end{align*}
Relationship to original problem
Note that the second problem is a generalization of the first.
You can retrieve the original problem by formally taking $T \rightarrow \infty$:
\begin{multline*}
=\left(1-F(\infty)\right)\int_{b}^{T}u\left[c(b,t)\right]e^{-\beta(t-b)}dt+\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[F(\infty)-F(t-b)\right]dt\\
=\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[1-F(t-b)\right]dt
\equiv \mu(b).
\end{multline*}
This formal limit can be made rigorous using the dominated convergence theorem:
Proposition. Under the assumptions stipulated above, if $t \mapsto u(c(b,t))$ is of polynomial growth in $t$ and $\beta > 0$, then \eqref{eq:result} converges to $\mu(b)$ as $T \rightarrow \infty$.
Proof. This follows immediately from the fact that
$$
\left|\int_{b}^{\infty}u(c(b,t))e^{-\beta(t-b)}\right|\leq\int_{b}^{\infty}\left|u(c(b,t))\right|e^{-\beta(t-b)}dt\leq C\int_{b}^{\infty}\left(1+t^{d}\right)e^{-\beta(t-b)}dt
$$
is finite.
Memoryless instantaneous probability of death
Suppose
$$
F(t)=\lambda\int_{0}^{s}e^{-\lambda s}ds=1-e^{-\lambda t}.
$$
is your mortality CDF (i.e., the survival function is $S(t)=1-F(t)=1-(1-e^{-\lambda t})=e^{-\lambda t}$).
In this case, direct substitution gives you the following expression:
\begin{multline*}
\left(1-F(T-b)\right)\int_{b}^{T}u\left[c(b,t)\right]e^{-\beta(t-b)}dt+\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[F(T-b)-F(t-b)\right]dt\\
=e^{-\lambda(T-b)}\int_{b}^{T}u\left[c(b,t)\right]e^{-\beta(t-b)}dt+\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\beta(t-b)}\left[e^{-\lambda(t-b)}-e^{-\lambda(T-b)}\right]dt \\
= e^{\alpha b}\left(\int_{b}^{\infty}u\left[c(b,t)\right]e^{-\alpha t}dt-e^{-\lambda T}\int_{T}^{\infty}u\left[c(b,t)\right]e^{-\beta t}dt\right)
\end{multline*}
where $\alpha = \beta + \lambda$.
The last line reveals that the problem is equivalent to the difference of two integrals without a terminal time (one with discount factor $\beta$, and one with $\alpha$).
