I know the feelin'. What's worse is when you are playing a more experienced dude for good practice, and he consistently beats you. You think "that's great, I'm getting MU experience, and I feel like I'm learning a lot.", but then you notice that he is choosing different characters not for personal satisfaction, but because he wants to stop winning. You notice that he is actually moving down the tier list with every couple of successive wins and before you know it he's on ****ing Pichu talking about how good of a char he is.
These things can be avoided. Couple a' things:
1. He's better than you at Melee in general, in which case you should not feel aggravated upon losing, but reflect upon every loss and toss out what you're doing wrong. You probably felt like **** after every loss in the series of dittos, which is a self-fulfilling prophecy, and will result in you feeling worse and losing even more. Never feel bad about losing.
2. You were underestimating his ability to use the character in the given MU. NEVER EVER underestimate your opponent; always play like they know exactly what they're doing and can 0-death you at any moment. Don't let your guard down and refer back to point #1.
Hope that helps.