It is legal to discriminate there is a valid reason to believe the disability prevents the person from doing the work. For example someone in a wheelchair isn't going to be able to work jobs which require standing. And it could certainly be argued that someone who freezes in communication situations could be unfit for many programming jobs where communication and confrontation is common.
Honestly the ideal situation here would probably be for OP to receive some kind of disability payment from the government and continue to work on open source projects.
Honestly the ideal situation here would probably be for OP to receive some kind of disability payment from the government and continue to work on open source projects.