When my 18 month old daughter is angry, while trying to soothe her, I offer her words for what she is feeling. Although she may not understand them or be able to repeat them yet, with consistency, I think she will be able to make the connection when she is developmentally able.
For example, yesterday, she crawled under one of our bar stools and yes, got stuck. She was both scared, hurt from bumping her head, and of course, angry that she couldn't get out. I told her all of those words, essentially narrating what happened with emphasis on the feelings-words. I think she's starting to get it, because although she doesn't repeat the words back to me, she calms down much more quickly, like she understands that I understand.