Well - there could be many things going on here. Let me start by saying 40 gallons really isn't much room for 3 comets and a pleco. All these fish get big, and all these fish produce mass amounts of waste.
The "ramming" could be that the fish are mating... however, when you talk about smaller tanks/tubs, it could also be a territorial issue. In small spaces, fish that normally do not fight will have tendency to fight. Even fish like danios and platies can harass each other if they are confined to limited room.
As for the fish that appears to be dying - I have no clue why this is happening. Did you test your water for ammonia/nitrites/nitrates? Also, that pleco you have... is it a common pleco? Plecos have been known to pick a fight with Goldfish. They love to suck the slime coat off of goldfish, leaving them weak and powerless.