Gain of FIR/IIR filters
Is there a reason you don't think that the general formulae are:

$$
G = \sum_{k=0}^{\infty} h[k]
$$

and

$$
G = (\sum_{k=0}^{\infty} h^2[k] )^\frac{1}{2}
$$

These will work, provided the system is linear and time-invariant (and BIBO stable).

To work with a rational transfer function:
$$
H(z) = \frac{\displaystyle\sum_{m=0}^{M} b_m z^{-m}}{\displaystyle\sum_{n=0}^{N} a_n z^{-n}}
$$
then the DC gain (at $z = e^{j0}$) will be:
$$
G_{DC} = \left. H(z) \right|_{z=1 = e^{j0}} = \frac{\displaystyle\sum_{m=0}^{M} b_m}{\displaystyle\sum_{n=0}^{N} a_n }
$$

I'll have to think a bit more about the second gain in your question.