Hi there. Thanks for the question. Let me see if I can help. Im sorry to hear your horse isnt feeling well.
I would suggest doing the following:
1. Check for a fever- young horses like children are prone to infections of various types. Use a human digital thermometer to check his temp. If it is 102 F or greater, then he has a fever and needs to see a vet asap to figure out what is wrong.
If no fever, I would wonder about one of 2 things:
1. Stomach ulcers from stress- if he has been bullied and stressed in the pasture then he may have ulcers in his stomach which cause pain every time he tries to eat. There is a medication for this called Gastrogard- you have to get it from the vet. Sometimes adding a 1/2 cup of corn oil to the feed is soothing to the GI tract as well.
2. A tooth problem- a 2 year old is still loosing some baby teeth and getting adult teeth, if he has a "cap" or retained baby tooth, this may be causing pain when he eats. You can not see all the teeth yourself, you'll have to have a vet examine him to check for this.
Of course colic is a concern as well but you did not mention that he is down or rolling or showing those kind of signs. If he is, call a vet immediately.
I hope this helps. Best of luck.