I believe that everything happens for a reason. And the people in your life, well, you meet them for certain reasons too. Of course I am not talking about the superficial reasons like getting to know the hot girl in the library or getting the number of a banker who could help you in your investments. I am talking about a deeper issue. The term "life lesson" comes to mind; and life is basically a journey in which one goes through learning whatever they have or are supposed to learn.
People appear in your life to put you through certain events and happenings so that you learn from them. These occurences may be pleasant and they may be downright dreadful. But they happen. Instead of thinking that fate has dealt you a cruel hand, ask yourself first, why did it happen. Your answer should be, for you to learn something out of the event.
The next question would then be: so, what have I learned? There is no point being bitter about anything. You could have gone through a horrible break up, you could have flunked your whole year, you could have been kicked out of the school's basketball team, you could even have lost a limb. A weak person would hide away from reality and think that they should give up on their dreams, their goals, even their lives. A strong person would ask, what now? (There is the exception of people who think they have learned all they need to and are contented with the way things are and how they have settled it and are ready to move on into the afterlife because there is nothing left in life to live for anymore. They are a different matter.)
Linking the above paragraph to the topic, people come and go. They appear in your life for a reason. It might be to help you realize a point which you have never been able to see before, it might be to screw you up. It doesn't matter. They appeared, for a reason. Your job is to find out what the reason is. A boyfriend who cheated on you could make you realize that you trust people too easily and you have to start protecting yourself. A friend could help you realize that life is just a mere dream and when you think you've had enough, it's up to you whether you want to end it or not. A critical person could help you realize that criticising other people's choices doesn't do anyone any good at all and that by doing so you would be narrowing your views in life.
As mentioned, people come and go. It doesn't matter when people appear and it matters just as little when they leave; as long as you learned something with the time you spent with them. Then your life would not be lived in vain, interacting with people will not have been a total waste of time. Because if you have learned nothing, then you'll probably be doing far better dead than alive, for living without learning and experiencing is not living at all.