Its a sign you need to change something.. So the best way to deal with it.. is to learn something from it. and a good place to start is to make sure you change whatever triggered it in the 1st place.
As I mentioned.. it forces you to look deep inside and that requires full self disclosure and honesty.. and you might find stuff that depresses you even more.. because let's face it.. no one wants to look at their ugly self.. But it's the only way you can change and grow..
The Chinese use the same word for crisis and opportunity, and they mean the same thing ..
When your wounds are fresh the only thing you can do.. is ride it out.. But sooner or later you will notice it weaken.. make sure you take something of with you and keep there forever.. Do not forget how hurt you felt.. and grow from it.
It is also good to help you learn compassion for others.. get past it but never forget it.. it will become your friend at some point. and it will become your teacher.