Failure is inevitable just do not let it define your life. It's a moment in your life not your entire life. Try to stay optimistic I know its hard but its better than seeing everything as red. Most importantly it is ok not to be ok. It is perfectly normal not to have everything figured out.