Just want to give you idea about conditions and dosages to use the salts.
Aquarium salt (sodium chloride) for injuries, wounds,external parasite, fin damage/rot (not plant tolerant)
Epsom alt (Magnesium sulfate) for buoyancy issues,swim bladder problems,constipation,internal parasites(helps but not treats); pop eye (plant tolerant)
Both have a antibacterial/fungal affect.
Both you can use in doses of 1tsp/gall up to 3 tsp/gall depending on what/why you treating . Also make 100% water changes daily with most treatments.
Aquarium salt you can use for 10 days , some cases up to 13 days. Epsom salt long time and with chronic constipation, sbd indefinitely in lower dose 1tsp/gall
Always pre mix and make sure it dissolved before you add it in the tank.
What wrong with you fish. Make sure if sb problem not something else. Epsom salt is very helpful the same as aquarium salt but you need to make right diagnosis. Some times you might think it can be sbd but it could be internal bacteria and internal parasites .
Always acclimate your betta when you do 100% water changes.