The generalized Langevin equation (GLE) can be derived from a particle-bath Hamiltonian, in both classical and quantum dynamics, and provides a route to the (both Markovian and non-Markovian) fluctuation-dissipation theorem (FDT). All previous studies have focused either on particle-bath systems with time-independent external forces only, or on the simplified case where only the tagged particle is subject to the external time-dependent oscillatory field. Here we extend the GLE and the corresponding FDT for the more general case where both the tagged particle and the bath oscillators respond to an external oscillatory field. This is the example of a charged or polarizable particle immersed in a bath of other particles that are also charged or polarizable, under an external ac electric field. For this Hamiltonian, we find that the ensemble average of the stochastic force is not zero, but proportional to the ac field. The associated FDT reads as 〈F_{P}(t)F_{P}(t^{'})〉=mk_{B}Tν(t-t^{'})+(γe)^{2}E(t)E(t^{'}), where F_{p} is the random force, ν(t-t^{'}) is the friction memory function, and γ is a numerical prefactor.