Yes constantly running out of gasoline in your cars fuel tank is bad for the cars fuel pump.
It's also bad to let the fuel tank run too low on fuel because then the fuel pump wears out much faster because the fuel pump relies on fuel for both cooling and lubrication.
When the fuel pump is not cooled and lubricated properly then it eventually burns out and then you'll have to replace the fuel pump.
If your car runs out of gasoline completely then you need to add at least 2 gallons of gasoline to get the fuel up enough to allow the fuel pump to pick up the fuel and keep the fuel pump cool.
Then when you get to a gasoline station you can then add more fuel to keep the fuel pump cooled and lubricated.
If you run out of gasoline then you also should turn the key on for a few seconds a few times to allow the fuel to get to the fuel injectors and then start the engine.
If it's a carburetor based engine then you want to pump the gas pedal a few times to allow fuel to get pumped into the carburetor to start the engine.