Upon receiving a phone call or letter of rejection, let interviewers know that although you're disappointed you're still interested in working for the employer. That is, if you are. If you are only marginally attracted to the company, be honest with yourself and do not follow up with the interviewer with any "still love to work with you" communications. But thank him or her for the consideration, of course.
Should you still have desires to work for the employer, thank the interviewer for the time and interest, re-emphasize your interest in openings and ask if you could continue to maintain contact. Find out if there are, or might be, other openings or other people you could contact.
Many times the person selected ends up turning down the job or doesn't work out. Keep the communication line open, positive and professional. This keeps your name in their mind for the next opening.
Stay positive. Congratulate yourself. You did get the interview, which means the employer was interested in you. Learn from the experience. Ask for feedback from the interviewer on what you could improve or do differently.
Keep trying. This isn't the time to stop. Forge ahead. Don't despair. Getting turned down happens to all of us at some point in our lives. It's up to you to decide which tips will work best for you.