OH wow! That’s a huge problem. The goldfish can’t live with the other fish. They are tropical warm water fish and the goldfish is a cold water fish. He needs to be in a 20G tank by himself or larger if you want to get him a friend because he will get up to 8” in size. Never put goldfish in with tropical. That’s the problem! They are probably picking on the goldfish too and can kill him. I’m actually surprised that the Betta and goldfish haven’t killed each other already. The Betta is probably killing him. Please, get that goldfish out of that tank right away. If you can get him his own 20G tank that would be great. If not, take him back to the pet store. They may not take him in the condition he is in. The other fish are going to eat him alive though.