I have hallucinations at work and I can't tell anybody
Why would you not tell anyone about the hallucinations that you are having.
I am pretty ashamed of them and afraid to let anyone know.
Being scared about telling them something might be wrong with you makes sense. No one wants to be judged for something like that. But hallucinations are serious and you should try to seek medical help because something could seriously be wrong.
I'm not going to do it with my job.
Well if you do not get any help than it could become even worse. If you want to be able to live and have a happy life than taking care of your mental health is very important. You are no lesser than anyone else just because you are going through a mental health issue.