The loss of a fish is a very sad occasion and often, whether the cause is known or not, the aquarist will wonder if it was his/her fault. Most (all?) aquarists lose a fish occasionally when the rest are perfectly healthy.
Despite the sadness, the aquarist needs to take action to maintain the quality conditions inside the aquarium, which will protect other livestock from further problems. A rotting fish may cause a rise in the load on the bio-filter, and the bio-filter may not be able to cope.
The answer is yes, the fish should be removed if possible. Easy enough maybe, unless there are many rocks in the aquarium. Fish often have a tendency, probably a defence mechanism, to hide in rocks when there is a problem.
In a fish only system using an external filter and not a lot of rock, or even one which uses a good quantity of live rock, as there aren’t any corals it should be practical to move rocks about until the corpse is discovered. This will stress the remaining fish and therefore the rock movement should be minimised as far as possible by moving rocks and replacing them in a methodical manner until the corpse is found.. This should also preserve the layout of the rocks. On the other hand, the ‘fish only with live rock’ aquarist if necessary could leave the fish in the rocks and proceed as in the reef system below.
In a reef system it is more difficult. The reef is constructed of many rocks and is usually covered in may corals of various types. The aquarist is not going to be particularly keen on dismantling the reef, even if it can be done methodically. The disruption is greater, and the stress to the living fish would probably be more severe. So what is the procedure?
It is the water quality that is being watched. As said, the presence of a rotting corpse can stretch or overload a bio-filter. The reef aquarist could make the decision to ignore the dead fish and monitor the water quality. This is an option because in the reef system there are normally less fish, again to protect water quality (though the bio filtration mechanism will still have adapted to the load it has to deal with). What is being daily tested for is any presence of ammonia. At the same time, the actions of the fish should be watched to ensure they are not showing any sign of discomfort, such as increased breathing rates and/or erratic and unusual swimming. The corals too should remain as normal. If any problem does appear then the action is a water change to dilute the toxin, the amount depending on the severity of the problem.
That said, it is possible that the reef aquarist will not note any detrimental changes in water quality, particularly in a mature reef. This is because the many tiny occupants of the reef are always ready for a meal, and are perfectly able to dispose of a corpse. I have, over the years, lost fish and removed them from fish only systems, and left them alone in a reef. The reef life dealt with the problem and removal of the fish in the fish only system prevented any problem arising.
The loss of a fish calls for water quality checks, unless the aquarist is sure of the cause.
If the fish can be removed, it is best to remove it. If not, monitoring the water quality for say at least a week should provide an adequate safeguard.