God is more concerned with making me righteous than with making me happy. Righteousness comes from a right standing with God; happiness -- as most people think of it -- comes from being surrounded by pleasant circumstances. Interestingly, even though God never promises us pleasant circumstances, many people seem to feel that they are owed happiness by God despite the suffering endured by the most Godly men and women throughout history (see Hebrews 11, particularly the end).
A happiness-centered worldview is really a self-centered world view, and it naturally prevents us from having a right standing before God, which requires humility. Even Jesus, God himself, suffered for the cause of righteousness, so why should we expect any less? In fact, James wrote that it is precisely this suffering that God uses to create within us the righteous, Christ-like qualities that he values more than happiness.
James 1:2-12A person who is spiritually mature will have a greater passion for personal righteousness than for personal happiness, and will consequently obtain both righteousness and happiness -- a happiness that comes not from mere circumstances, but from the joy of having a right relationship with God.
2 Consider it pure joy, my brothers, whenever you face trials of many kinds, 3 because you know that the testing of your faith develops perseverance. 4 Perseverance must finish its work so that you may be mature and complete, not lacking anything. 5 If any of you lacks wisdom, he should ask God, who gives generously to all without finding fault, and it will be given to him. 6 But when he asks, he must believe and not doubt, because he who doubts is like a wave of the sea, blown and tossed by the wind. 7 That man should not think he will receive anything from the Lord; 8 he is a double-minded man, unstable in all he does.
9 The brother in humble circumstances ought to take pride in his high position. 10 But the one who is rich should take pride in his low position, because he will pass away like a wild flower. 11 For the sun rises with scorching heat and withers the plant; its blossom falls and its beauty is destroyed. In the same way, the rich man will fade away even while he goes about his business.
12 Blessed is the man who perseveres under trial, because when he has stood the test, he will receive the crown of life that God has promised to those who love him.