According to medicine, bad dream is not necessarily concerned with your mental state. It is not necessary if you are having night mares, your mental condition is not stable.
This might occur to you due to some other intakes like drugs or some time bad food.
This might also be the case that you see bad dreams at night when you were upset due to some official work in day.
So do not get upset, it happens to every one.