I had 2 fan tailed goldfish, i think no.1 killed no.2, so i didn't get another.. we renamed him 'Pig', and hes been very happy by himself for 6 years. So my guess is you'll be ok.. (unless mine is just the devil incarnate)
We had two but one died in mysterious circumstances (Goldie couldn't provide a watertight alibi) shortly after we got them. Goldie has looked happy, and often shifty, living alone for the past 5 years.
Sorry about your fish. They do like company but since they need so much space a lot of people keep one on its own. How big is your tank? This is a good guide of goldfish tank sizes and life expectancy.