It is in the nature of a few less evolved beings to gain confidence by belittling, insulting, or invalidating another. It’s a character flaw within them that cannot be corrected by anything that you say or do so, your best bet is to disassociate yourself from that person altogether and pursue a healthier relationship elsewhere.
Don’t waste time trying to change the person or make them understand your point of view, just make a clean break from them altogether so they can, hopefully, be forced into the self-evaluation that they so desperately need to undertake.
In other words, there is no honor in being someone’s plaything. You have to make the decision to believe that you are worthy of better than a relationship where a person’s only aim is to use you to feel good about themselves.
Life is too short and the population too big to accept that you aren’t worthy of more than a modicum of respect.
Don’t be the doormat that people are content to walk on, there are plenty enough people ready to fulfill that role already—you don’t need to add to that number. Instead, be the confident, potential-laden, person that you were born to be and make your friendship a privilege not an entitlement.