Ecclesiastes 8
You will not always get things your way, so learn to deal wisely with disagreements. A shining face is better than a stern (impudent) face, and it is wisdom that makes the face shine. Learn to smile—and to laugh!
As much as possible, submit to authority, do what you are told, and keep your promises. Do not get angry and resign, but do not be a partner in anything wrong: “We ought to obey God rather than men” (Acts 5:29). Wise people have discernment and know the right time to speak and to act (v. 6; James 1:5).
There are many injustices (vv. 10–13) and mysteries (vv. 14–17) in this life. Leave them with God and do what He calls you to do. There are still many enjoyable things in life if you do not make yourself the most important person to be pleased. Put God first and serve others, and life will become meaningful and joyful.
Warren W. Wiersbe, With the Word Bible Commentary (Nashville: Thomas Nelson, 1991), Ec 8.