Here are some very pragmatic advices not based on what it should be (were the world fair and just) but on what is most likely is:
1. If your music can be heard outside your earphone it must be very loud. For your own auditory health sake turn it down. Even if you are using it to isolate from the office noise, once you lose your hearing you cannot get it back so it is not worth it to sacrifice it for short term gain.
2. Regarding all the misbehaviour towards your other coworkers, don't interfere. A lot like in domestic abuse cases, sometimes the victims end up taking the aggressor's side and you end up in a situation of both the aggressor and the victims being against you. Just don't.
3. The kind of abuse you are being subjected is not tolerable and the best way to stop it (as others said) is to quit the job. It is very unlikely that there is a course of action that will result in you keeping your job and your abusive boss getting fired.
4. People failed to understand the depth of your problem: if you can't afford to eat properly you can't afford to pay for a lawyer and probably you don't have the spare time to find one out that will take your case pro bono or on contingency. If you could, the best course of action would still be to quit.
Now is the part of the advice that will really suck because it assumes a flawed world where doing the right thing don't always pay out and doing the wrong thing isn't always punished.
Being totally honest here: (as per your other post) you took a PHP job not being in touch with the technology for the past 8 years. You took a Windows shop job being a Linux person for the past 15 years. It is very hard to understand how you got the job in the first place given the lack of technological fit and they will probably treat you as a stop gap until they can find someone more qualified.
If your situation is so dire that you were willing to fill the position anyway and if you can't afford to quit a job that in the second day you already found out that is not for you: you will have to muster the strength and carry on.
- Block out all external stimulus not related to your task at hand
- Don't talk to your coworkers except for task related subjects.
- Don't listen to your coworkers conversations.
- Don't observe your boss comments or behaviour.
- Don't respond to abusive comments.
- Hide your feelings as well as you can, fake a convincing laugh and keep at your task.
- Don't spend a single additional second of your own time the presence of abusive people
- Do your job as well as is necessary to receive your paycheque and count the days until you can finally quit.
These are not idealist advice, it is very unlikely that you are going change that workplace environment, save your coworkers or win a big lawsuit. But if you can't absolutely quit that job (and, assuming conditions as bad as you describe, I would even if the alternative was hunger and homelessness) pretend, fake and carry on as well as you can in this situation.
And sorry for the long post.