As there are plenty of expectations from every small work we do, we tend to get sad if the output is not according to our belief. I was in the similar situation during the repeat year of studies, the result of regular tests was many times totally different (in a both good or bad ways) than what i was expecting. But one thing that stood in my mind is that hard work done on one thing will never get wasted. The output will come in the expected way or in the unexpected way but it is sure that it will come sooner or later. All it needs is patience and just doing the required work with that extra inch of push. I believe any goal or work can be made great with 50% of that extra effort by you and that 50% with the help of god. Now, if the life is full of difficulties and may be torturous, be patient, Almighty will provide a light to walk in from totally unexpected way.