Whether you are friends or lovers
And someone chooses to put you in your place, instead of just telling you that he is not willing to have a relationships that you are looking for, that is not cool to do, that is not how I would treat a person who I call my friend.
People get grumpy, have mood swings, and get like that, we all do, but after you wrote him a love letter, his response was more than passive aggressive, I would take it as cold, intentional stepping up the behavior to put you in your place rather than say he the relationship is not what he is looking for and does not want a friendship as involved as you desire.
Desiring a close friendship or relationship is not something I would call "an agenda" and if if it was, at least you made your "agenda" known. Being a dick to someone who desires a closer relationship than he isn't willing to be in, does make one question themselves.
Maybe he honestly had no idea your letter was meant to convey you had feeling for him, and he genuinely didn't understand where you were coming from, but it seems to be more of someone putting you in your place, rather then letting you know that according to his view of your friendship you have been getting out of line.
My boss at work would have enough sense not to treat an employee that let alone a friend.
maybe he really is dealing with tough times and needs you to be understanding, but ...
I don't appreciate friends who treat me like a boss, especially if they treated me shitty enough to the point where if he was my boss, I will tell him to fuck off before I quit