You can punch a wall or write a song. Just as painful either way, but you have something to show for it at the end of the day with a song.
I write most of my songs when I'm in a bad mood.
Frankly, I have always dreaded writing - there always seemed to be pain involved, unpleasant self-examination and a lot of fear.
Any time I sit down and write music, the first part of that is always centering myself and thinking about who I currently am.