Add a New Loss Term and a Gradient Term which are inconsistent

Question: I want to embed a new loss term into the neural network. However, its gradient is the modification of the derivative of the newly added loss term. I want to know if there is any reference.

The loss, gradient and updated gradient are shown in the following equations.