Feeling crappy...

Don't let it get you down. If you knew it all, you wouldn't need to go to school right? You are there to learn. Study the returned test, find out what you did wrong and most likely a light bulb will go off. A year or even a few months from now this will all look so easy and you'll wonder how you ever got it wrong. At this stage it's more about the learning process than the content itself. Your professors know this.