Bring your phone for Netflix/music/reading as others have said.
Sign up for a beginner group lesson where everyone else will be having a hard time too.
Sign up for something low intensity like yoga where you can close your eyes and relax and get over that initial hump.
Ask for a tour of the equipment where they will show you how to use stuff so you're not shuffling around awkwardly when you see a new machine.
Some gyms also have a "bring a friend for free" types of deals sometimes so you can convince someone to come just once or twice till you get comfy.
Sign up when there a lot of newbies like at New year's so you don't feel like you stick out.
Try to shift your schedule so you can at least go a few times when it's very quiet and you can take your time getting comfortable.
I despise working out and sweating and I'm super self conscious to boot, so I know it can be incredibly hard to take the first step. In any situation where I'm not comfortable I try a few things that usually help me:
Look for the other people who are on the same boat as you. Look for the older people or anyone who seems like they are pushing themselves. If they can do it, so can you!
Fake it till you make it! I have a silly mantra and I repeat it to myself till I feel calmer. It's "I'm calm, I'm confident, I'm committed." At best, I end up believing it, at worst, it distracts me from feeling terrified!
And finally, try to remember the age old wisdom: Noone cares about you!! Ok that sounds horrible and depressing but it really helps me at the gym
Most people you see in the gym or elsewhere won't even remember you after 5 min, why risk your health and well-being for something like that which doesn't matter?
Good luck!