The Dementor is a metaphor for depression and also other types of anxiety such as sadness and fear. Accordingly, the Patronus charm is a symbol for the positive thoughts that you are required to think to be able to face your fears and make the Dementors disperse.