Assume that any person you encounter is of potential value to you. If they prove otherwise, then fine; but start with the assumption that they have something to offer you, by being who they are. Let them prove you wrong.
A typical response to this strategy is: “But many people will disappoint me. How can I live with that?”
The question itself reflects an attitude of failure — an attitude that will lead to failure (interpersonally and socially), in practice. Imagine the same attitude applied to work and career: “A lot of jobs out there aren’t any good. Many people are disappointed by their careers. Why should I even attempt a career, then?” Ask yourself what kind of career success (or failure) the attitude implied by this question will lead to.
If you accept yourself, then rejection doesn’t matter. If you haven’t accepted yourself, then rejection will always be a catastrophe — because, you feel, acceptance by others is the only means to attain self-acceptance. Of course, it never works out in practice. If you won’t accept yourself in the first place, and you find people who do accept and like you anyway, you simply wonder, “What’s wrong with them?”
A good way to develop self-acceptance is to write down your good points and remind yourself of them regularly. Go a step further, too. Ask yourself, “What can I do today that someone I consider an admirable or competent person would do?” Then do it, and write down that you did it. Keep track of all these actions. You can learn to like yourself even if you don’t. Give it time, and put the time into it, every day.