epsom salt doesnt work. neither does peas. i wish people would stop suggesting that people feed their bettas peas.
the best thing you can do is to put him out of his pain.
get some clove oil from amazon and use it to euthanize him in a small cup of water with clove oil. it's very fast.