This should be the codependent mantra, I used to say it all the time and didn't know why it kept happening in my life:
"No good deed goes unpunished"
I thought of that when I read your post. It is because we make horrible choices in people to invest in. The Bible has a fitting verse, "Do not cast your pearls before swine." Unfortunately, this is a horrible time of intense learning but I bet you emerge stronger and more sure of yourself. Everything AH has taken from me or made me give up out if necessity or fear, has actually been a blessing in disguise moving me forward, making me be stronger. What was intended for evil may end up being a blessing to you.