I get very nervous, my heart starts racing, my knees get weak and my breath becomes short.
That's adrenaline, your body is preparing you for fight or flight. If you do neither, you might "freeze".
One thing you can do when it happens is to start yelling and shouting. Yelling and shouting aren't just for intimidation, it is also a way to take deep breaths and get more oxygen in you. This will allow your brain (and muscles) to work better.
You should be going with people you trust, have a "protest buddy", agree on a meeting spot should you get separated. Come up with contingency plans (either as an individual or a group) for various situations.
You also have to decide for yourself whether you want to fight or hang back and help those who do (both equally valuable roles). Decide this before the protest, so when the moment comes you're not debating with yourself. Again, this goes back to preparedness and planning.
Speaking of, have a backpack with water, some snacks, first aid kit, eye-washing liquid, no drugs, no weapons, no alcohol, no glass bottles, no razors, no knives. Having a backpack with some essentials will also reduce fear by making you feel more prepared.
Btw, the feeling you're describing never goes away, it's a (useful) natural response, you have to get used to it. It's like when your body starts convulsing when it thinks it's out of oxygen. Free divers still experience it, but they know that it is just a warning, not actua suffocation (a body has lots of time, minutes of oxygen, left once the convulsions start).
And lastly, music. Listening to music before/during a protest also helps.
I don't smoke, but a lot of people do and apparently nicotine can help with nerves. So there's always the chemical option, too.