Whether you own or work at a development firm / agency, the primary factor in determining your happiness is going to be learning when and when not to care. In my younger days, I cared entirely too much about entirely too many things. Even today I find myself being overly concerned with the wrong things. It's a recipe for frustration and anxiety which can end up poisoning your business.
For me, and I suspect for many others, the trouble stems from pride in one's work. Normally that's a good thing, but in the case of consulting work it can cause problems. You want to do your best, and for the most part you know better than the client when it comes to making decisions and producing the result, otherwise they probably wouldn't have hired you. Commonly, the client will second guess your approach, criticize the result, or down right demand that it be done a different way. This might come along with some negative comments about how you and your firm are performing, and it usually comes from the person responsible for the project on the client side, aka the client lead.
This will make you mad. You're doing what they asked! They flip-flopped on the requirements! They told us to take that out, now they want it back in!? To top it off, the client lead is scoring points off you with their boss, either deflecting the blame or absorbing the credit depending on the opportunity. If you let yourself care, you're going to get aggravated. You may even let this aggravation show when interacting with the client, which I'm guilty of, and is the worst thing you can do. The compounding factor is that you're usually right (because you're the expert) and they're usually wrong.
But here's the thing. You're Batman.
The beauty of being an outside firm contracted to take on a project is that you can be the hero they need, not the one they deserve. You can take all of the blame, false or otherwise, when things go bad. You can take none of the credit, silently making everyone look good but yourself. You can provide knowledge, planning, and direction to the client lead making that person seem like the expert. It's why they are paying your firm, and it's why pride is dangerous in this relationship. It's something that you can't let yourself care about.
If you own the business, another thing you need to get over is the 'being your own boss' mentality. The truth is that in a consulting firm, every client is your boss and you're perpetually the employee. That was an annoying realization for me to come to, but a true one. Of course you have control over your resources internally, and you have the choice to decline client work, but for the most part you're working for somebody else at all times. If you don't own the business, you might have to interact with the client directly making it seem like you have multiple bosses which is also frustrating.
Batman doesn't care about such things because he is a selfless public servant. He cares about right and wrong and doing what's right even when there is no reward / recognition. Even when he's falsely blamed. That's the mental state you should be in when you're working on a project for a client.
This list of things you should care about is short. In fact it's just one thing: the relationship with the client.
At all costs (unless you're trying to sever ties), you should be working to strengthen your business relationship with the client. Be what they need you to be, regardless of how you personally feel about it. Make yourself indispensable from their perspective. If you allowed the client lead to pour blame on you, deflect mistakes, and take all of the credit, then they are going to need you again in the future for sure. You might have to over-deliver and lose some margin in the process, but if you can form that long lasting trust, it will lead to a lot more business. The client lead will use you on other projects at their company, they'll also bring you along when they change jobs and need to look good.
The takeaway here is that, for your own happiness and well being, you need to realize that it's not about you personally, it's all about the client. You should 100% do your best and care about your work, but realize that it's not for you. Batman doesn't do heroic acts to make himself look good, he does what's right for the benefit of those that rely on him.