Can depression cause partial unconsciousness where you lose a bit of your mind, your personality changes and you do things without being aware of it?

Maybe. Depression can be very severe and cause problems with memory. But first it is important to make sure there is not something wrong physically! There physical conditions that can cause alterations in thinking, some are fairly easy to correct and some are harder to fix, but the key is to find out if that's the issue, so you don't get worse! See your GP and get a full physical. No drugs, alcohol.
Partially conscious. and not remembering doing things are serious symptoms. Please see your doc for POSSIBLE neurological problem or psychological stress reaction. He/she will help you sort things out. Peace and good health.