Sorry, I wanted to clarify what I just posted, but I ran out of edit time. What I am getting at, is, if this were a really mean aggressive horse who wanted to hurt people, wouldn’t he have charged from the minute he saw OP in his pasture? Instead, it sounds like something triggered him when he got closer. It seems that the trigger had to be something he could only see / smell / hear / whatever from a close distance. Knowing that, could it be possible to deduce what the trigger was and then work on fixing that?
Before i say this, i want to be perfectly clear that in no way am I trying to "blame" the OP. Also, in no way am I trying to excuse what the horse did. It should not be tolerated, ever, from a horse or any other animal.
That said, I think perhaps when the horse got close something he saw in body language, energy, etc from the OP affected him. Whether it was sensing hesitance, fear, anger, etc. Horses are individuals, and some are way more sensitive to the energy and emotion/tension that people are feeling.
For example, my Arabian gelding is generally calm and easygoing... However, if my emotions are high, whether excited, tense, scared, etc he senses it in a second and responds much differently. If I approach him with a more agressive or fearful mindset he responds very badly.
Again, not blaming OP, simply suggesting that any fear or hesitance or what have you may have contributed to his reaction when he got closer. I would most definitely seek out an experienced horse trainer to work with him, or to sell him to. Just my opinion....