We develop a general formalism applying to Newtonian self-gravitating Bose-Einstein condensates. This formalism may find application in the context of dark matter halos. We introduce a generalized Gross-Pitaevskii equation including a source of dissipation (damping) and an arbitrary nonlinearity. Using the Madelung transformation, we derive the hydrodynamic representation of this generalized Gross-Pitaevskii equation and obtain a damped quantum Euler equation involving a friction force proportional and opposite to the velocity and a pressure force associated with an equation of state determined by the nonlinearity present in the generalized Gross-Pitaevskii equation. In the strong friction limit, we obtain a quantum Smoluchowski equation. These equations satisfy an H-theorem for a free energy functional constructed with a generalized entropy. We specifically consider the Boltzmann and Tsallis entropies associated with isothermal and polytropic equations of state. We also consider the entropy associated with the logotropic equation of state. We derive the virial theorem corresponding to the generalized Gross-Pitaevskii equation, damped quantum Euler equation, and quantum Smoluchowski equation. Using a Gaussian ansatz, we obtain a simple equation governing the dynamical evolution of the size of the condensate. We develop a mechanical analogy associated with this gross dynamics. We highlight a specific model of dark matter halos corresponding to a generalized Gross-Pitaevskii equation with a logarithmic nonlinearity and a cubic nonlinearity. It corresponds to a damped quantum Euler equation associated with a mixed entropy combining the Boltzmann and Tsallis entropies. It leads to dark matter halos with an equation of state $P=\rho k_{B} T_{\rm eff}/m+2\pi a_{s}\hbar^{2}\rho^{2}/m^{3}$ presenting a condensed core (BEC/soliton) and an isothermal halo with an effective temperature $T_{\rm eff}$ . We propose that this model provides an effective coarse-grained parametrization of dark matter halos experiencing gravitational cooling. Specific applications of our formalism to dark matter halos will be developed in future papers.