Zach Braff says he's NOT gay ... and insists he's the victim of a HACKER -- who broke in to his website this morning and posted a fake "coming out" statement.

The phony statement appeared early Wednesday morning -- reading, "I have been hiding a secret inside me for too long. The human mind can only bare so much before it explodes in emotions, and well ... it is time to let the world know. I am excited and proud to announce that I am an open member of the homosexual community."

But Zach's rep tells TMZ ... "He was hacked ... that site has been down since 2006."