Clearly a lot of effort would have gone into training horses historically, just as today, but seeing as how a melee would be particularly terrifying for a horse - were there additional steps taken so that they would remain controllable? Or was it just the normal training you'd give any riding horse and then keep them as blind as possible? Even if nearly totally blind, how would the smells and sounds not trigger panic?
And I know, time and place; honestly I'd be interested in hearing from an expert in any period/location that's knowledgeable in this topic. If we simply must narrow it down then let's say circa 1415AD Western Europe.
The training of warhorses is a fascinating subject, and the answer to your question is: yes, we do have some sources on the topic, which I will approach from a much earlier era in history. You aren't wrong that in most circumstances, a horse would rather flee a combat melee than stick around as they are prey animals, but this was recognized by people in the past too. There were a variety of methods and tricks they used to keep the animal from panicking, ranging from training down to the individual horse they chose.
Firstly, I'm going to briefly point out that the majority of warhorses are stallions. Stallions have a tendency to be more inclined towards fighting in the first place as they fight each other for the mares (may the strongest one win). This is not to say that mares and geldings weren't used for warfare, they were simply the exception to the rule rather than the norm. Most depictions of horses out of Egypt and the near east in ancient times are rather clearly stallions. However, the qualities that make stallions preferable for warfare also make them a handful for everyday riding, which is why geldings and mares were typically your riding horses of the day. Again, this is not to say it was a rule, there were certainly exceptions but generally speaking, this holds true in the record.
As for training, there are a few early sources on this ranging from Xenophon, the Hittite Horse texts (which includes the Manual of Kikkuli), and from India, the Arthasastra of Kautilya (which is primarily a military or political text, however it does contain information on caring for horses). From Xenophon, we have his treatise On Horsemanship which delves only briefly into training. What he does have tends to be applicable for all situations, and not just warfare.
The groom should have standing orders to take his charge through crowds, and to make him familiar with all sorts of sights and noises; and if the colt shows sign of apprehension at them, he must teach him—not by cruel, but by gentle handling—that they are not really formidable
- Xenophon, On Horsemanship
Dealing with crowds is a skill that is useful for both combat, parades, or simply riding into town. It should remembered that Greek cities of the era were full of bright colors (and not just the plain white marble we see in ruins today), and the agoras were places of assembly and/or markets. Green horses were no doubt at times overwhelmed by the sights, sounds, and smells in these situations, which Xenophon advises a gentle and friendly approach to overcome.
Simple handling was merely the first step in training horses to endure the hustle of cities, or even the camps of soldiers on campaign. Even if a horse could endure it behaviorally, there is still the physical stresses to be dealt with in battle. Much like bootcamp today conditions recruits for service, there was conditioning training for horses such as what is described in the Manual of Kikkuli. Kikkuli of Mitanni was a horse trainer circa 1345 BCE for the Hittite king Suppililiuma. His work is a combination of a training schedule and caring schedule for chariot horses primarily, but the methods would no doubt apply to ridden warhorses as well.
Day 2. Pace one league, run two furlongs (furlong = 1/8 mile). Feed two handfuls grass, one of clover, and four handfuls barley. Graze all night.
Day 3. Pace two and one half leagues (Hittite league = three miles), run two furlongs out. Run three furlongs, pace half a league home. Green grass at midday, followed by watering. Pace one league in evening. Feed grass and straw at night.
Day 4. Pace two leagues in morning, one at night. No water all day. Grass at night.
Day 5. Pace two leagues, run twenty furlongs out and thirty furlongs home. Put rugs on. After sweating, give one pail of salted water and one pail of malt-water. Take to river and wash down. Swim horses. Take to stable and give further pail of malted water and pail of salted water. Wash and swim again. Feed at night one bushel boiled with chaff.
Day 6. Wash five times in morning, graze in afternoon and wash once. Repeat for four days.
Day 12. Keep in stable all day. Feed only grain and cut grass. Repeat for 10 days.
Day 23. Wash in warm water. Feed grass. Repeat for seven days.
Day 31. Same for three days…
Day 34. Picketed outside stable all day without feed or water. Race three furlongs in evening, graze all night. Repeat three days.
Day 38. Swim morning, then pace two leagues. No day feed or water. Evening, pace nine furlongs. Night feed grass and straw. Repeat nine days.
- From the International Museum of the Horse, English translation by Anthony Dent from the French translation of the original by B. Hrozy
Horses further along in the program faced even more rigorous schedules and only the best/most fit horses would have succeeded. This meant that warhorses were NOT everyday riding animals. They were too valuable for anyone to use for everyday riding.
Additionally, hunting (which has long been a favorite pastime of the wealthy/royalty) was also routinely used to train and condition horses for combat, particularly when done alongside hounds or falcons. The smell of blood, presence of predators, and simply the fear of attack from an enraged hunted animal were not typical elements of other methods. Horses that were able to handle this were very well suited for the stresses of the battlefield.
As for combat itself, we now get into the tack that would have been used on warhorses. Bits have been around for a long time as a control device for horses, both for riding and for chariots.
The destrier required firmness for him to respond in the intensity of battle. Bits used on destriers had long cheek pieces or shanks and high ports since these would provide greater leverage on the curb which exerted pressure on the horse’s mouth. The reins were covered with metal plates to protect them from being cut by an opponent’s sword.
- From the International Museum of the Horse, Tournaments, description of bit and bridle
These kind of bits are generally far more severe to offset both the difficult nature of handling stallions and the danger of losing control in battle. A severe bit meant that warhorses wouldn't have been able to do anything besides listen to their rider or else they'd feel actual pain from the bit. They would have been unable to flee or veer away in battle. Painful bits are not unique to the medieval era, check out the Canaanite bit from the late bronze age on THIS page to see other examples.
Horses were NOT blinded for battle. Blinders, which prevent sight behind and to the side, are mostly found in racing (and though I've seen recreations of historical events include them, I have not seen them in the depictions themselves), though some chanfrons (the part of the horse armor protecting the horse's face) did provide the same function. Restricting a horse's sight was more of a trade off than a specific feature as protection was the primary goal. A blind horse after all was liable to trip on unseen hazards which was problematic for the horse, the rider, and other cavalry around them.
More can of course be said on this topic as I have approached it from an era far earlier than the 1400s in Western Europe.
Sources:
The Horse in the Ancient World, Ann Hyland
The Horse in the Middle Ages, Ann Hyland
On Horsemanship, Xenophon
Legacy of the Horse, Kikkuli Text, Online Exhibit at the International Museum of the Horse
Legacy of the Horse, Tournaments, Online Exhibit at the International Museum of the Horse