No, fish arenâ€™t mammals they are ectothermic, ectothermic is another word for â€ścold-bloodedâ€ť.
Fish are paraphyletic animals. The word â€śfishâ€ť is a misnomer and the word â€śfinfishâ€ť is better to use in biology. People often use the word â€śfishâ€ť to describe anything that swims in the sea, but not all things that swim in the sea are fish.
As you say, dolphins, seals and whales are not ectothermic creatures. Instead they are warm-blooded mammals that can control their own body temperature.
Almost all fish process oxygen and other gasses through their â€śgillsâ€ť but mammals like whales and dolphins donâ€™t do this. Ocean mammals need to surface for air.
One animal in particular is often mistaken as a mammal but is in fact a fish and that is the Whale shark. The Whale shark is a species of fish and it is not a whale as its name might imply. Rather its name Whale was used to describe the massive size of this fish.
Finfish are often thought of as animals that have no â€śfeelingâ€ť which means that fish canâ€™t feel any pain. This was the popular idea and response that most people had around the world about pain in fish.
Recent studies are starting to show another story. According to William Tavolga, fish do experience pain and they also experience fear. He experimented with an animal called a toadfish where he shocked it with electricity repeatedly over a period of time. Eventually the fish started to make â€śgruntingâ€ť noises from the moment they saw the electrode.
An interesting report from the University of Edinburgh suggests that rainbow trout feel pain because they displayed behavioural signs that were the same in mammals that experienced pain. Their neurons also displayed the same patterns as those in human brains.