I'm sorry.
Please don't be angry with yourself. Sometimes these things are out of your control. I'm sure you did a great job at your interview, but maybe (for example) they preferred another candidate because they're a relative or something. So in that case, it's not your fault at all and you shouldn't be angry with yourself. In my opinion, sometimes these things are rigged.