Assume you have a non-homogeneous Poisson process with intensity $\lambda(s)$, assume for convenience that $\lambda(s)$ is continuous.
Let us assume we are in the interval $[0,T]$, it can be proven that we have a finite number of jumps a.s. Assume you have a positive function $f$ and if a jump happens at time $c$ you get the value $f(c)$. I have proven that if $f$ is continuous then
$$E\left(\sum\limits_{s_\le T}f(s)I_{\{\text{jump at time s}\}}\right)=\int\limits_0^Tf(s)\lambda(s)ds.$$ Note, the sum is well-defined, because we have a finite number of jumps $a.s$.
Using this, how do I generalize to the situation where $f \in L^1([0,T])$? Here I am really struggling. Note: I don't think it is that hard to expand it to the case where $f$ is Riemann-integrable. But I want the case where it is Borel-measurable and $L^1$.
PS: I also use one regularity condition that is normally not used in a poisson process, but I don't think it is relevant to the question, but I can show it here: $$\lim \limits_{s\uparrow t}P(\text{1 or more jump in the interval [s,t]})=0,$$ with the arrow other way($t\downarrow s$) follows from the usual conditions of a poisson process.
Let $S_1,S_2,\ldots$ be the arrival times of the process. You are then looking to compute $$ E\left[\sum_{i=1}^{N(t)} f(S_i)\right], $$ where $N(t)$ is the number of arrivals up until time $t$. Now, conditioned on $N(t)=n$, $S_1,\ldots,S_n$ follow the joint distribution of the order statistics corresponding to i.i.d. random variables $X_1,\ldots,X_n$ with density $\lambda(s)/\Lambda(t)$ where $\Lambda(t) = \int_0^t \lambda(s)ds$. I assume you have that result. Then, $$ E\left[\sum_{i=1}^{N(t)} f(S_i)\bigg| N(t) = n\right] = E\left[\sum_{i=1}^n f(X_{(i)})\right] = E\left[\sum_{i=1}^n f(X_i)\right] = n E[f(X_1)], $$ where $X_{(1)},\ldots,X_{(n)}$ are the order statistics corresponding to $X_1,\ldots,X_n$.
You can now compute $E[f(X_1)]$ using the change-of-variable formula, which holds for any $f \in L^1$. You then uncondition on $N(t)=n$ to get the result you want.