For the truly righteous, the objective of righteousness is righteousness itself, and not happiness. The reward of righteousness is peace [with oneself].
It only becomes problem
when a bastard pretends to be righteous. 
The bastard gets caught between his cravings for unscrupulous happiness and his desire to maintain a righteous image.