I had somewhat similar symptoms to you when my fuel pump went out. Every so often my fuel gauge would randomly drop all the way to empty and my low fuel warning light and chime would come on. But usually when that happened, I would shut off the engine and then it would be fine when I started it back up. It did that off and on for a few months. Then every once it a blue moon the engine would sputter like it was about to die. I gave it more gas pedal and then it started running fine again. Weird... But I never did think it was fuel pump related. Then one day my wife takes off in my truck, and when she stopped at the stop sign at the end of our block, the engine died and would not start back up. Normally she would have been driving her own car, but it was in the shop and she had a Nissan Sentra as a rental which she absolutely HATED, so she basically took control of my Burban. To make a long story less long, I ended up towing a big ass Suburban with a 2017 Nissan Sentra.
It was only one block, and I kept it under 10mph the whole time, but it was still funny as hell. Got the Burban in the driveway and spent the rest of the day diagnosing it, and I confirmed 100% that the pump was bad. I ordered a new AC Delco pump from Rockauto, so $150 and 3 days later I had the pump.
I installed it myself in my driveway in two days. You need to get it jacked as HIGH as you possibly can. I had the two front tires on ramps and the rear was up as high as possible on 12ton jack stands. You need it as high as possible so that you have enough room to drop the tank, and then slide it out. My 17yr old son helped me with part of it. Disconnecting all the emissions lines and fuel lines was hands down the most difficult part. That's difficult because you have to drop the tank a little, then disconnect the lines, then you can drop the tank the rest of the way. I have a bad back, so it did take me two days, mostly because I had to stop after I got the tank completely removed because I was in so much pain. But most people should be able to get it out, swap the pump, and then get the tank back in all in a single day. Now here's all the tips I can give you from my experience tackling this job.
Just try to remove as much fuel as possible from the tank. I disconnected the fuel fill hose and leaned the tank down and a few more gallons poured out into a bucket.
Cover all openings with tape or aluminum foil or something after you disconnect the lines. The less dirt and debris that gets into the tank, the better. And if you can take a few minutes to prevent more dirt from getting in, then DO IT! Keep PLENTY of towels or rags nearby to quickly wipe up any fuel spills. Cardboard and oil-dry will help with this as well.
Be sure that you have a set of quick connect release tools in order to get the fuel lines disconnected. I have a set from Harbor Freight and they work "ok". I'm sure there is a better set of them out there, but I don't have any experience with anything other than this set.
And my biggest tip of all is to DEFINITELY get a genuine AC Delco fuel pump!!! I have seen lots of people use other brands and they ended up having to replace it again within a year or so. I do NOT recommend getting an AutoZone fuel pump (regardless of the lifetime warranty) unless you plan on getting rid of your truck within the next year. If you are keeping your truck, get the Delco pump. The Delco pump also comes with a new wiring harness pigtail. This is a very common failure point in these trucks. This is something that you should focus on before you replace the pump. A bad pigtail can cause all the same symptoms as a failed fuel pump. So when you are diagnosing your truck, pull the pump pigtail down and test it and inspect it for any signs of corrosion, damage, or melting.