That is the essence of step 4 of any 12-step program, which I equate with shadow work. "Step 4 is simple yet often very painful. The purpose of the step is to let go of one’s resentments by identifying what character defects in ourselves were triggered by the actions or omissions of the person we resent — every street has two sides." That's from my https://medium.com/illumination/spirituality-redefined-ff45cb53eaf2 , which in the second half posits that everyone could benefit from the action and maintenance steps of any 12-step program.