捨てる神あれば拾う神あり

Etymology
Literally, "if there is a god that throws you away, there is a god that picks you up."

Proverb

 * 1) when one door shuts, another opens