Blessed are those who mourn, for they will be comforted. Matthew 5:4. From comfort comes happiness and joy.
The Kingdom of Heaven is here, but not yet is a common expression of the state we are at the moment on earth. Jesus introduced the spiritual Kingdom of Heaven which resides in our hearts (body, mind and soul).
When a person sins against God, the Holy Spirit convicts him. Realising the sin committed the person mourns, repents and seek forgiveness.
God will bless and comfort the sinful person who mourns about his inapt actions, and true repentance will bring about happiness. Happiness then becomes joy, which has a deeper sense of fulfilment and contentment, when he is liberated from the sin which he had committed.
Bible verses:
James: 1:2-4
1 Peter 1: 6-9
John 15:11
Acts: 13:52
Hebrews 12:2