"As for this worthless slave, throw him into the outer darkness, where there will be weeping and gnashing of teeth" (Matthew 25:30).
"When the Son of Man comes in his glory, and all the angels with him, then he will sit on the throne of his glory. All the nations will be gathered before him, and he will separate people one from another as a shepherd separates the sheep from the goats" (Matthew 25:31-32).
The verses you are requesting don't really relate to each other as a whole thought. Verse 30 is the conclusion of the parable of the talents; the 'worthless slave' is the one who fearfully decided not to invest the talent that had been entrusted to him by his master, but to hide it away. The 'outer darkness' we experience in our lives when we refuse to put our God-given gifts to work, investing them so that we can be fulfilling our spiritual purpose, does indeed lead us to weep and gnash our teeth (one of Matthew's favorite images).
In verses 31 and 32, Jesus begins his description of how far-reaching the consequences of negative choices can be. The process he describes is one that we experience every day as we live as spiritual beings within this illusive, dualistic world. Once we recognize the "Son of Man" as our own true identity, it becomes necessary to separate those thoughts in consciousness that affirm that new (to us) spiritual Truth (the sheep) from those thoughts that were formed in fear and false belief (the goats). There is no judgment involved here; the goats are not 'bad.' It's a simple act of discernment that negative thoughts need to be lovingly dissolved in the Light of our new spiritual awareness.