Getting a job is hard, especially in the Tech area where the interviews are harder than the main job. So there are 2 ways to respond when you do not pass an interview.
1. You note the questions you failed and study the subject better.
2. You get disappointed and self-doubt yourself.
Most times we fall into the 2nd category, and it is okay to feel bad. But don’t dwell on it. Feel bad, note where you fell and move on by learning that topic better so that you won't fall at that same point anymore.
Because of the frequent rejection, we tend to not be too excited to get on another Interview.
On dear, every interview brings along its lessons and goals. So let's not let the past rejections make us seems not interested in new opportunities.
This is advice to me too after searching for a remote frontend role for about 3 months now. It's long enough to break me.
So my approach to failing interviews these days is to feel bad, buy myself a drink for at least trying, and then go back home and resume my studies.
I won't give up because I know nothing good comes easy.