Stop judging yourself and others. Stupidity is a judgement that has no real psychological value. Insecurity can sometimes lead to people calling themselves "stupid", but few people are that judgemental. People with borderline disorder can be irrationally (on no real basis) cruel to themselves. Many people suffer from similar diagnoses. Seeing a mental health professional is the only way out.