The only way to control the mind and free it from the evils you mention is always to take the Name of God, meditate upon His great attributes and surrender all your actions to Him