Even if you de wormed your horse, if you did not do a decal test you should because you may have missed worms or given the wrong amour of deepened.
You probably do not want to give your horse flax seeds. They make them very shiny but tend to give them a ton of energy as well. The bast feed for gaining weight is barley, although barley is high in proteins, which gives a lot of energy. Rice bran is my personal preference for underweight horse that have a lot of energy. Beet pulp works too.
You should also watch your horse eat. You want to make sure he is eating all of his food. You should also look for signs like dribbling, which can indicate a problem with his teeth. Thoroughbreds tend to be harder to keep weight on due to personality, so you probably just need to feed more, making sure you feed effective foods