Theory of entropy production in quantum many-body systems