This is a question I got from someone via instagram DM. Here was my answer:
First take inventory of who is discrediting your knowledge. Are they an authority in the subject or do they just have an unsolicited/rude opinion? The latter doesn’t deserve much energy if it's clear they are not trying to learn or inform but to belittle and condescend.
If they are an authority, I try not to internalize it and take it as an insult of my intelligence (even though that may have been their intention). If I’m wrong that doesn’t make me ******. I hear them out and learn something. However, if I know beyond the shadow of a doubt that I’m right, I stand my ground.