Let $h(t,z)$ be a continuous complex-valued function defined for $0\leq t<\infty$ and $z\in D\subset\mathbb C$, where $D$ is a domain. Suppose that for each fixed $t$, $h(t,z)$ is an analytic function of $z\in D$. Finally, suppose
$$H(z)=\int_0^\infty h(t,z)\,dt$$
is finite (i.e., the integral converges) for all $z\in D$.
How can we prove that $H(z)$ is analytic on $D$?
I should add that I'm not sure these conditions suffice to show what I'm hoping to prove—if they don't (or if they can be weakened), please let me know.
I'll note as an aside that I'm learning complex analysis from T.W. Gamelin's book, which "proves" the above result for integration over arbitrary finite real intervals (p. 121). Unfortunately, even this proof is flawed because he uses facts about uniform integration that he does not introduce until later, and even if there is no circularity in his argument, his claims aren't clearly justified.
I also looked in some other books on complex analysis (Mathews and Howell, Saff and Snider) and cannot find a proof of the above theorem in either one. I would happily accept recommendations of good books on complex analysis that prove this result.
As remarked in the comments, if you add the assumption that the integrals converge absolutely and locally uniformly, then $H$ is analytic. However, under the stated assumptions it is not true, although I have not found a simpler counterexample than the following, which is both non-explicit and probably beyond an introductory complex analysis class.
By Runge's theorem, there exists a sequence of polynomials $(H_n)_{n\ge 1}$ such that $|H_n(x+iy)| < 1/n$ for $(x,y) \in [-n,0] \times [-n,n]$ and $|H_n(x+iy)-1| < 1/n$ for $(x,y) \in [1/n,n] \times [-n,n]$. This means that for all $z \in \mathbb{C}$, $$ \lim_{n\to\infty} H_n(z) = H(z) = \begin{cases} 0 & \text{for } \textrm{Re } z\le 0 \\ 1 & \text{for } \textrm{Re } z > 0 \end{cases}$$ Importantly, $H$ is a pointwise limit of analytic functions, but it is not continuous, and so it is not analytic either. For convenience, we define $H_0(z)=0$.
As a next step, we want to smoothly interpolate between these polynomials, to get a function $H(t,z)$ for $t \ge 0$, $z \in \mathbb{C}$, which is continuously differentiable in $t$ and analytic in $z$. There are different ways to do this, probably the easiest is the following: The polynomials $p_{a,b}(t) = 2(a-b)t^3+3(b-a)t^2+a$ (used in Hermite interpolation) have the property that $p_{a,b}(0)=a$, $p_{a,b}(1)=b$, $p'_{a,b}(0)=p'_{a,b}(1)=0$, and $|p_{a,b}(t)-a| \le |b-a|$ for $0 \le t \le 1$. Now define $$ H(t,z)=p_{H_n(z),H_{n+1}(z)}(t-n) \qquad \text{for } n \le t \le n+1. $$ Then $H(n,z)=H_n(z)$, $H_{n+1}(z)=H_{n+1}(z)$, and $\frac{\partial H}{\partial t}(n,z)=\frac{\partial H}{\partial t}(n+1,z)=0$. This shows that for every fixed $z$ the function $t \mapsto H(t,z)$ is continuously differentiable on $[0,\infty)$, and that this derivative $h(t,z) = \frac{\partial H}{\partial t}(t,z)$ is actually jointly continuous in $(t,z)$ and analytic in $z$ for every fixed $t$. Lastly, $|H(t,z)-H_n(z)| \le |H_{n+1}(z)-H_n(z)|$ for $n \le t \le n+1$, which implies that $\lim\limits_{t\to\infty} H(t,z) = \lim\limits_{n\to\infty} H_n(z) = H(z)$
Finally, define $h(t,z) = \frac{\partial H}{\partial t}(t,z)$. By the fundamental theorem of calculus $H(s,z) = \int_0^s h(t,z)\, dt$, so that $$\int_0^\infty h(t,z) \, dt = \lim_{s\to\infty} H(s,z) = H(z) $$ for all $z \in \mathbb{C}.$ This shows that this limit is not analytic.
By the way, the fact that $H$ is analytic almost everywhere (except on the imaginary axis) is no accident. By Osgood's theorem, the pointwise limit of analytic functions is analytic on an open dense subset of the domain, and as a consequence of this theorem and the fact that the statement in the question is true for integrals over bounded intervals, any such function $H$ has to have this property.