  Using Nottale's theory of scale relativity relying on a fractal space-time,
we derive a generalized Schr\"odinger equation taking into account the
interaction of the system with the external environment. This equation
describes the irreversible evolution of the system towards a static quantum
state. We first interpret the scale-covariant equation of dynamics stemming
from Nottale's theory as a hydrodynamic viscous Burgers equation for a
potential flow involving a complex velocity field and an imaginary viscosity.
We show that the Schr\"odinger equation can be directly obtained from this
equation by performing a Cole-Hopf transformation equivalent to the WKB
transformation. We then introduce a friction force proportional and opposite to
the complex velocity in the scale-covariant equation of dynamics in a way that
preserves the local conservation of the normalization condition. We find that
the resulting generalized Schr\"odinger equation, or the corresponding fluid
equations obtained from the Madelung transformation, involve not only a damping
term but also an effective thermal term. The friction coefficient and the
temperature are related to the real and imaginary parts of the complex friction
coefficient in the scale-covariant equation of dynamics. This may be viewed as
a form of fluctuation-dissipation theorem. We show that our generalized
Schr\"odinger equation satisfies an $H$-theorem for the quantum Boltzmann free
energy. As a result, the probability distribution relaxes towards an
equilibrium state which can be viewed as a Boltzmann distribution including a
quantum potential. We propose to apply this generalized Schr\"odinger equation
to dark matter halos in the Universe, possibly made of self-gravitating
Bose-Einstein condensates.
