Using God’s name in vain is considered a grave matter. At that point, it comes down to whether or not you had full knowledge and full control to be a mortal sin. Generally, if something slips out by accident, it at least indicates that the third condition was not present, and the sin is therefore venial. It is still good to bring up in next Confession, though.