As a general rule, homeless individuals will always speak one decibel louder than you in a disagreement (because people raised in poverty speak differently and argue differentlythan people raised in the middle-class).
If you raise your voice to reach their volume, they will just raise their voice even louder. It is a never ending cycle that you cannot win. So, don't try.
Instead, do the exact opposite. As a person begins to get louder, you should actually get quieter.
One of three things will happen:
Some people will actually start to get quieter without you even saying anything (though always staying a little louder than you).
Even those people who don't get quieter with you, most will not get any louder.
It sets the stage for you to ask the individual to speak more quietly.
My favorite line for asking someone to quiet down:
“I am more than happy to talk to you about this, but can you turn the volume down a notch or two?”
In my experience, most people don’t actually realize how loud they are being. If you speak more quietly and ask them to do the same, most people will comply.
Calm
Just as you do not want to try to compete with an angry patron over volume, you do not want to compete on "franticness."
The trick is to speak very "matter of factly" about things that are not normal. You want to say "If you do that again, I will be forced to ask you to leave" with as much emotion as if you were saying "Our library is open from 9am to 9pm."
A few tips:
Speak relatively slowly.
How you stand will influence how you talk. If you stand casually, it is hard to speak frantically.
Take pauses (especially if you feel yourself getting upset).
Make sure you keep breathing.
Listen
The mere act of listening can diffuse most angry homeless patrons (no one ever listens to them!). I recommend reflective listening, where you repeat back to them what they said, but in your own words. For example:
“I understand that you are frustrated that you cannot get a library card.”
“What I think you are saying is…”
“I believe you that it must be very difficult to sleep in the shelter.”
Note: Empathizing with someone’s situation is not the same as agreeing with their behavior.