Here's one of the secrets to happiness: Sometimes you have to work at being happy. This is normal. Preparing makes it easier.
When I find myself getting frustrated or annoyed about something, I make lists. What do I like about it? What can I do to make things better? What alternatives would I consider, and in which situations would those alternatives be better? These things keep me firmly focused on moving forward.
I particularly like the practice of listing what I like. This is a good exercise in gratitude, and it makes it even easier to deal with future hiccups.
For example, before I married W-, I wrote a long list of things I appreciated about him. It's an incomplete list, but I'm sure it will help us get through future disagreements. I haven't needed it yet. Ditto for work. Yes, I've written down a list of reasons why I like IBM. When I feel like sticking my tongue out at a frustrating problem or process, I review my list–and often find myself adding a few more reasons why.
I like focusing on what I can do to make things better, too. It's fun. Sometimes I need to ask other people for help, and that's good practice as well.
It's easy to forget your reasons when you're tired or frustrated or annoyed or angry. No point in getting sucked into that spiral, though. Work around your limitations by writing things down before you get into that situation, and focus on productive thoughts when you need to deal with something.