Whether the course was a difficult subject or an easy subject, failing a course can be devastating. At the same time, the course you might have to repeat might even lead you to the feeling of embarrassment. The reasons for embarrassment could vary, but whatever you do, do not let it get to you.
Let me be brutally honest. I am a student who has failed a course in College Algebra. Yes, COLLEGE ALGEBRA. I have my reasons for it but what matters most in this kind of situation is to acknowledge it, try harder next time, and avoid feeling embarrassed. If you have “friends” or acquaintances who tease you about it or make you feel stupid, it’s time to dump them and make new supportive friends. There is no reason why you should feel embarrassed about failing a course. Even if you may have failed it more than two times, that’s still fine. All you need to do is figure out a way to tackle it the third, fourth, or seventh time around.