  By extending a result of Kronheimer-Mrowka to the family setting, we prove a
gluing formula for the family Seiberg-Witten invariant. This formula allows one
to compute the invariant for a smooth family of 4-manifolds by cutting it open
along a product family of 3-manifolds and studying the induced maps on monopole
Floer (co)homology. When the cutting 3-manifold is an L-space, this formula
implies a relation between the family Seiberg-Witten invariant, the
Seiberg-Witten invariant of the fiber and the index of the family Dirac
operator. We use this relation to calculate the Seiberg-Witten invariant of
families of 4-manifolds that arise when resolving an ADE singularity using a
hyperk\"ahler family of complex structures near the singularity. Several
applications are obtained. First, we establish a large family of
simply-connected 4-manifolds $M$ (e.g. all elliptic surfaces) such that
$\pi_{1}(\textrm{Diff}(M))$ has a $\mathbb{Z}^{\infty}$-summand . For such $M$,
the product $S^{2}\times M$ smoothly fibers over $S^{2}$ with fiber $M$ in
infinitely many distinct ways. Second, we show that on any closed symplectic
4-manifold that contains a smoothly embedded sphere of self-intersection $-1$
or $-2$, there is a loop of diffeomorphisms that is not homotopic to a loop of
symplectormorphisms. This generalizes a previous result by Smirnov and confirms
a conjecture by McDuff in dimension 4. It also provides many new examples of
4-manifolds whose space of symplectic forms has a nontrivial fundamental group
or first homology group.
