Rejection is hard, causes all kinds of old and new unwelcomed feelings. Start trying to wrap your mind around this being a blessing, that he did you a favor, a kind act so that you can have the life and relationship you deserve with the person capable of giving that to you.
Wrap your mind around that you deserve far better then what he could have possible offered you.
Wrap your mind around understanding red flags with people and relationships and get to a healthy place. Heathy attracts heathly, unhealthy attracts unhealthy.