Teaching by instruction and example is much more effective, especially at this age. Instead, show your child empathy. Rather than getting angry, take a moment to calm yourself down. That hurt him, and it made me sad. Please tell him you're sorry.
Research suggests that children who learn responsibility also learn altruism and caring.
You're being so nice to him. He's really happy you're giving him his dinner. Acts of kindness and charity are an excellent way to teach your child empathy. Bring her along when you're taking a meal to a sick neighbor or a friend with a new baby. Let her help you pack the bag of clothes to take to the local charity.