I added a small amount (maybe 1/2 cup) of crushed coral in a bag to the filter in my 30 gallon tank. The ph is now around 7. No more fish deaths and the fish seem happy and healthy.
Just this afternoon I've changed the gravel substrate in the Betta tank (10 gallons) to sand with a small amount of Aragonite sand. Its ph is now around 6. The tank looks awesome with the sand, and the Kuhli Loaches are a lot more visible now.
I guess I will be having to test the ph daily for a while. I've bought one of those hang in the tank ph monitors, but it says that it only works accurately if the water is properly buffered. So, I have to test the hardness until I can actually add it to the tank.
I am so happy things are finally looking up, and I would like to thank all of you for your support!