First, realize that everyone has experienced personal rejection like this, so please don't be so hard on yourself. You may be beating yourself up with questions like, "Is there something wrong with me?" That's completely unnecessary and self-defeating, so if you're doing that, then kindly stop now. Consider this rejection to be ONLY ONE data point in a lifetime of data about yourself. Your self-esteem is much stronger than this one little data point, right?
Although the rejection feels intensely personal because it's fresh, we also understand that sometimes we don't understand what motivates our attraction (or lack of it) to someone else. Another person can have all the "right" qualities, but oddly, we just may not be feeling it and can't quite articulate the vague reasons why. Attraction may be hard to explain or turn on or off. There are important biochemical and even genetically-driven components to attraction that you can't possibly change.
In getting over him, focus on positivity and yourself. Don't avoid him and try not to ruminate. Humor helps a lot so seek out funny movies, cat videos, a comedy club with friends, or whatever will make you laugh. Also try to exercise because endorphins are the body's natural "feel-good drug." Do something fun and rewarding with friends that will boost your mood in a healthy way (e.g., group mani/pedis, escape room outing). Listen to positive, mood-boosting music such as the Positive Vibe Playlist: Happy and Uplifting Songs to Put You in a Good Mood https://hubpages.com/playlists/Feel-Great-Playlist... If you write, paint, enjoy photography, do crafts, or otherwise artistically express yourself, consider some projects that will constructively occupy you and help move you forward. Of course, also talk to someone you trust about your feelings during this time so that you can keep things in perspective and focus on the future.
I'm sorry you had to face this, but I feel confident that you'll get through it with some time and support.