I wish I could give you a logical reason for what has happened to you–but to be honest, I can't. Life isn't always fair, nor is it always the way we wish it were.
But I can tell you this: God knows what you're going through, and He understands your disappointment and hurt. Even when we don't understand why God allows bad things to happen to us, we still can know that He is with us and cares for us. After all, He suffered a hurt far greater than you and I will ever go through when His only Son was rejected and put to death for our sins. The Bible's words are true: "The Lord is near to all who call on him, to all who call on him in truth" (Psalm 145:18).
This is why I urge you to turn to Christ and bring your burdens to Him. The Bible says, "Cast your cares on the Lord and he will sustain you" (Psalm 55:22). God loves you; He loves you so much that Christ was willing to go to the cross for you. Why not turn to Him and ask Him to come into your life today?
From what you say in your letter, I suspect you have sought happiness mainly through your relationships. That isn't necessarily wrong; they can be a gift from God. But we have the greatest relationship of all when we accept Christ, for we enter into a personal relationship with God. Commit your life and your future into His hands today.