At some point in this life, you will fall in love with the wrong person, befriend the wrong person, care for the wrong person.
You'll eventually figure out that they are the wrong person when you realize they don't value you nor do they value your concern for them.
It's okay that all of this happens, it's not nice and it's hurtful, but it's okay. You're not the first person this will happened to and you won't be the last. The fault is on them, not you.
When you come to see these people for who and what they are, leave them in your past. Because if you don't they'll just keep taking and taking. It's a harsh lesson and I wish it weren't true, but it is.