Euphemisms are substitute words or phrases that are considered less offensive ways of expressing something. For example, instead of saying, "Your dog died," you could say, "Your dog went to sleep" or "Your dog didn't recover." This is an appropriate use of a euphemism.
Then there are euphemisms for what are considered vulgar or coarse terms. Such euphemisms may or may not be acceptable depending on societal standards and context.
But some euphemisms are wrong even when society deems otherwise. Often people use euphemisms for the names of God and Jesus, such as "gosh," "golly," "gee" and "geez." What many people don't realize in using such terms is that they violate the spirit of the Third Commandment, which says, "You shall not take the name of the LORD your God in vain, for the LORD will not hold him guiltless who takes His name in vain" (Exodus 20:7). To use God's name in a vain way means doing so in a casual or idle way.
While the use of euphemisms for God's name may not be as bad as using the actual names, since there may be a sincere intent here to avoid violating God's command, it constitutes a violation nonetheless. Modifying God's name so as to avoid technically using it while still retaining a similar sound is itself a form of treating His name in a cavalier, unacceptable manner.
As a matter of respect for God, we need to remember that His name is holy (Psalm 111:9). Saying one of God's names, or even a euphemism for God, when we are upset or angry does not honor Him. Neither does using His name, or a euphemism representing His name, when we really aren't thinking of Him. Using euphemisms in these ways violates the Third Commandment.
Of course, this is not to say that God will hold us guilty for being completely unaware that some word we use is a euphemism for His name. But we might be guilty of negligence in our speech, as all of us have a responsibility to be careful in what we say (Matthew 12:36-37), which includes looking into such expressions. This applies all the more once we are aware that such substitute expressions exist and that we shouldn't use them.