Here are a few verses that might shed some light on the question (sorry, being a new user, I can only give you links for context for the first two due to SPAM protection on stackexchange):
The book of Psalms, Chapter 27, Verse 1
"The LORD is my light and my salvation; whom shall I fear? the LORD is the strength of my life; of whom shall I be afraid?"
The book of Psalms, Chapter 56, Verses 3-4
"What time I am afraid, I will trust in thee. In God I will praise his word, in God I have put my trust; I will not fear what flesh can do unto me."
The book of Isaiah, Chapter 41, Verse 10
"Fear thou not; for I am with thee: be not dismayed; for I am thy God: I will strengthen thee; yea, I will help thee; yea, I will uphold thee with the right hand of my righteousness."
The book of Isaiah, Chapter 41, Verse 13
"For I the LORD thy God will hold thy right hand, saying unto thee, Fear not; I will help thee."
The book of Psalms, Chapter 34, Verse 17-19
"The righteous cry, and the LORD heareth, and delivereth them out of all their troubles.
The LORD is nigh unto them that are of a broken heart; and saveth such as be of a contrite spirit.
Many are the afflictions of the righteous: but the LORD delivereth him out of them all."
The book of Psalms, Chapter 94, Verse 18-19
"When I said, My foot slippeth; thy mercy, O LORD, held me up.
In the multitude of my thoughts within me thy comforts delight my soul."
The book of Proverbs, Chapter 18, Verse 1
"The name of the LORD is a strong tower: the righteous runneth into it, and is safe."
The book of Isaiah, Chapter 40, Verse 31
"But they that wait upon the LORD shall renew their strength; they shall mount up with wings as eagles; they shall run, and not be weary; and they shall walk, and not faint."
Epistle to the Romans, Chapter 15, Verse 4
"For whatsoever things were written aforetime were written for our learning, that we through patience and comfort of the scriptures might have hope."
Epistle to the Romans, Chapter 15, Verse 13
"Now the God of hope fill you with all joy and peace in believing, that ye may abound in hope, through the power of the Holy Ghost."
The way in which positive emotions seem to be created and negative ones eliminated seems to be mainly through the belief that one is doing God's will, and that it is the way to salvation.