Good teachers (I was a special education teacher of emotionally disturbed middle schoolers) do this all the time in order to build and maintain positive relationships with students. Be available positively, However, if a student is upset, remain present, don't abandon them, but also don't engage negatively with them. "Re-calculate" by using neutral verbal and body language. Be ready to help them "re-calculate" when they are ready.
More information about text formats