Rejection is part of life. Rejection by lovers, rejection in job applications, rejection for promotion, offer for a dream house being rejected. DD is currently furious and down in the dumps because she was rejected when she applied for inclusion in her employers redundancy scheme. They said she was too valuable to the company. Even that failed to console her, she had other plans
I am sure, Nanano, you have faced all kinds of rejection in life and coped. Perhaps you might analyse why this particular rejection has affected you so much. Was it suggested that you were a shoe-in for the job, is the successful applicant younger than you or junior to you? Will you have to work for them? Are you menopausal or has something else happened that has made you feel you are getting older and you are afraid that age will stop you getting any further promotion?
Once you know why this rejection has upset you so much, I am sure you can then work out the best thing to do to help you get your mojo back or where and how to seek help.