How can I get my son to stop sucking his thumb?

How can I help my son? He has been chewing and ripping his thumb for weeks now. It’s constantly bleeding after it heals because he will go back and rip it again. I put neosporin and bandaids which he takes off to keep ripping. Should I take him to see his pediatrician? I really don’t want it to get worse. Is this anxiety? He’s 4.