Strong’s #5162, nacham. To console, comfort, be sorry. In this passage the two instances are in the Niphal reflexive = being sorry, repenting.