Make sure that God is the one who shut the door. If God really did shut the door then stop banging on it. Otherwise, Matt 7 "Ask and it will be given to you; seek and you will find; knock and the door will be opened to you.
"Lord, if it's not your will, let it slip through my grasp and give me the peace not to worry about it anymore." - however, if something is going to slip through your grasp it may require actively opening your hands
~Keep your head up. God gives his hardest battles to his strongest soldiers!~Joshua NLT 9 This is my command—be strong and courageous! Do not be afraid or discouraged. For the Lord your God is with you wherever you go.
Life isn't about finding yourself, it's about discovering who God created you to be. “You have been set apart as holy to the Lord your God, and He has chosen you from all the nations of the earth to be His own special treasure.