Of course, it is a mental problem. Actually, in the most of the cases I have seen from people who have claimed to have self-edteem problems or showed symptoms of not having a healthy self-esteem, those were people who were going to some kind of psychiatric treatment (antidepressants mostly), which would imply low self-esteem in many cases is to the cause of the problems, but actually a consequense which comes from more embedded issues (which are not so understood by people around those who suffer from anxiety or depression).
The best way to deal with it is to first try to reach out to people one can trust and talk about what one feels about one's own being and the intrusive thoughts on our worth. After building up some trust and talking about our problems, then it would be time to sell for professional help and visit a psychologist or psychiatrist. Even though mental problems and the consumption of medications of that sort is highly stigmatized, it is no excuse to allow our situation to get worse than already could be.
Just my two satoshis on this matter.
Never lose hope.