Doctrine and Covenants 25:12 teaches us about the importance of good music:
12 For my soul delighteth in the song of the heart; yea, the song of the righteous is a prayer unto me, and it shall be answered with a blessing upon their heads.
This verse comes from a revelation to Emma Smith, the wife to the prophet Joseph Smith. She was asked to compile the first hymn book for the use of the church. We learn that the Lord enjoys a good song, and counts it as a prayer to him.
Good music is very powerful. It can go beyond just brightening our day. It can be a protection to us. There is a classic talk given by President Boyd K Packer of the quorum of the 12 apostles. In it he teaches us the power of music. This is an excerpt from his talk titled "
Inspiring Music--Worthy Thoughts":
I had been told a hundred times or more as I grew up that thoughts must be controlled. But no one told me how.
I want to tell you young people about one way you can learn to control your thoughts, and it has to do with music.
The
mind is like a stage. Except when we are asleep the curtain is always
up. There is always some act being performed on that stage. It may be a
comedy, a tragedy, interesting or dull, good or bad; but always there is
some act playing on the stage of the mind.
Have
you noticed that without any real intent on your part, in the middle of
almost any performance, a shady little thought may creep in from the
wings and attract your attention? These delinquent thoughts will try to
upstage everybody.
If
you permit them to go on, all thoughts of any virtue will leave the
stage. You will be left, because you consented to it, to the influence
of unrighteous thoughts.
If
you yield to them, they will enact for you on the stage of your mind
anything to the limits of your toleration. They may enact a theme of
bitterness, jealousy, or hatred. It may be vulgar, immoral, even
depraved.
When
they have the stage, if you let them, they will devise the most clever
persuasions to hold your attention. They can make it interesting all
right, even convince you that it is innocent—for they are but thoughts.
What
do you do at a time like that, when the stage of your mind is
commandeered by the imps of unclean thinking?—whether they be the gray
ones that seem almost clean or the filthy ones which leave no room for
doubt.
If
you can control your thoughts, you can overcome habits, even degrading
personal habits. If you can learn to master them you will have a happy
life.
This
is what I would teach you. Choose from among the sacred music of the
Church a favorite hymn, one with words that are uplifting and music that
is reverent, one that makes you feel something akin to inspiration.
Remember President Lee’s counsel; perhaps “I Am A Child of God” would
do. Go over it in your mind carefully. Memorize it. Even though you have
had no musical training, you can think through a hymn.
Now,
use this hymn as the place for your thoughts to go. Make it your
emergency channel. Whenever you find these shady actors have slipped
from the sidelines of your thinking onto the stage of your mind, put on
this record, as it were.
As
the music begins and as the words form in your thoughts, the unworthy
ones will slip shamefully away. It will change the whole mood on the
stage of your mind. Because it is uplifting and clean, the baser
thoughts will disappear. For while virtue, by choice, will not associate with filth, evil cannot tolerate the presence of light.
In
due time you will find yourself, on occasion, humming the music
inwardly. As you retrace your thoughts, you discover some influence from
the world about you encouraged an unworthy thought to move on stage in
your mind, and the music almost automatically began.
“Music,” said Gladstone, “is one of the most forceful instruments for governing the mind and spirit of man.”
There are many excellent Hymns that can be used to inspire, uplift, and even protect us. See
http://www.lds.org/churchmusic/ for some excellent examples. Choose your favorite one, and use it as President Packer suggested. Think it/sing it in your mind when those thoughts come in to your mind that should not be there, and they will go away.