Well there's no use in living in the past. What's done is done. So now what? You really wanted this part! How will you ever get over this type of blow? I have a few tips that I hope will help with that:
1-For starters, don't ever ask the director why you didn't get a role! This is a big no no! As bad as you want to know just don't do it. Even if you don't agree with the director's casting choices, there is usually a method to their madness. If you absolutely have to know, think about asking a different way. For instance, ask "What can I do differently" or "What should I improve on". This way you will get some constructive criticism to help you with your next audition.
2-Revisit your audition book. Are you singing songs that you've been singing for years? Are you still using monologues that you used 3 years ago? It's probably time for some new material then. You should have your songs that show you off. The ones that you know will guarantee you a call back because you are so awesome at them. However, after a while, even those songs get old to directors. There's plenty of musical theatre songs out there to choose from. Make it a point to learn new songs every year. Read more plays so you can find new monologue material. Sometimes actors forget that monologues need to be fresh too. Especially musical theatre actors. They get caught up on choosing the right music so much that they forget about the monologues! As a director, I want to know that you can act as well as sing. It's just as important.
3-Once you've gone through 1 and 2, you need to think about training. I say it all the time. As an artist you are always training. Always. Training to be a better performer, director, choreographer, etc. Every show you do prepares you for the next one. You are only as good as your last show. When you aren't performing you should be taking workshops and classes so that you can continue to have great auditions. Train hard, train always!
4-Last but not least, calm down! It's not the end of the world. There could be several reasons why you weren't cast. You may not have been what thy were looking for. You might have wanted to play Elphaba but they saw you more as a Galinda. You have to know your type too but that's a blog for another time! Take it easy on yourself. Have about a 7 minute pity party and then move on. Actors are told no more than any other profession. It won't be the first time or the last time that you will be told no. Get yourself some ice cream, put on some Hamilton, put your hair in a bun and have a jam session by yourself. Then get up the next day and regroup and get ready for the next audition.
I hope this helped in some way. Don't you give up! I'll see you at the theatre!