My phone has never been rooted, and has never had anything other than the official firmware installed on it.
If you can go back to Lollipop, you could do that and try the OTA update. Theoretically, it should be the same update, but who knows.
I was running Cyanogenmod on my S5 during the lolipop days. I just flashed the stock firmware I downloaded from SamMobile with Odin. I got stuck at tmobile boot screen like you but then I just flashed again and it worked. I rooted immediately after.
Just try redownloading the firmware from SamMobile and flash again with Odin. The first boot may take up to 20 minutes.
If Odin doesn't work then use the emergency recovery feature in Smart Switch. That WILL wipe your data however.
I figured out what happened or rather how to fix it. I used Smart Switch to update from Lollipop to Marshmallow but after the phone finished optimizing every app it decided to restart and it was stuck on the T-Mobile boot screen. I thought maybe I just had to wait so I left my phone on all night and it was still stuck. I thought maybe it was because I had it rooted before since I tripped Knox or something. I even tried wiping both cache and dalvik cache using TWRP but the same thing happened. So I thought that I had to factory reset and I decided to go to the XDA and download a deoxed version of the stock rom but also downloaded the modem and bootloader files. I used ODIN to flash both the modem and bootloader files and forgot to flash the deoxed stock rom and miraculously my phone actuallly booted up successfully.
If you can flash the modem and bootloader then grab the files from this link: [ROM] G900T_PE1-6.0.1 Stock Rooted Deodexed … | T-Mobile Samsung Galaxy S 5
Hope this helps
I was able to get Android Marshmallow to work by using Samsung smart switch emergency recovery mode, it said it would delete all the information, and remove all previous information on the phone. Before this I had also wiped cache partition, and also to wiped data/factory reset.
This time the T-mobile boot logo screen only lasted 3 minutes (I timed it). This is still longer than previous android versions.
Previously I had waited up to 20 minutes on the T-mobile boot logo screen.
Big take away, the first time Marshmallow boots will take a long time, longer than previous android versions. Leave the phone alone for at least 20 minutes, ignore any stupid messages by smart switch asking you to disconnect and reconnect the phone immediately. Also it goes without saying, backup your phone before updating.