You are eligible for sick pay for mental health issues. If you need time off work for this reason, it should be treated in the same way as any other illness.