Hello,
Firstly I have to say how important it is to tell your doctor about what you have said.
If you can't confide in your doctor than change to one you can - see them a few times it will build up trust.
I know from experience that negative emotions feed on themselves.
When I have dark thoughts I try to destract myself by thinking about people or places I love, putting music on, reading something or simply going for a walk.
I have found in the last couple of weeks that subconsiously I have been dwelling on the past and remembering the trauma of my PP of 16 years ago - when I was commited to a mental hospital.
I've been thinking about it recently because I wanted to tell some people about it so they can better understand me.
I phoned my mate last night and asked him why it might be that I think about it when I don't want to.
He is a very dear freind I've known for about 16 years, not qualified in psycology but always has the best advice when I turn to him for help and he makes a lovely cup of tea

He told me that the human mind is like a field with paths.
The more we think about something the deeper the path and the mind gets acustomed to taking a familiar path.
So subconsiously when my mind is idle it might take the path without me realising it - just 'cos it's done that so many times before.
So, my adivce is not to think about your dark thoughts as difficult as that might be at times.
I also had some hypnotism to improve my well being about 10 years ago.
The hypnotist got me to imagine a beach with pretty shells and to think of different shells as good / happy experiences I have had.
So that when I felt the darkness I could look at my beach

and admire my gorgeous shells !
It also works as a garden with pretty flowers.
It brings feelings of pleasure you've had in the past into the present.
I hope this helps x