“Do not throw a stone into a well from which you drank.” (Babylonian Talmud, Bava Kama 92b)
The Talmud relates this saying to the verse (Deuteronomy 23:8) that we should not detest an Egyptian, for we were sojourners in their land.
Even though Egypt eventually subjected us to brutal slavery, deadly torture and mass murder – they did originally welcome Jacob and his family to their land where we did live for a time undisturbed.
There are experiences and relationships that we all have in life that were ultimately not healthy for us. But we must always be grateful for any benefit that we did receive.