I started off with cognitive behavioural therapy while I was pregnant for compulsive handwashing. This was about 10 sessions. Cognitive therapy tends to be quite time limited - not like stereotypical analysis which drags on for years and years(!)
The cognitive element of the therapy involved talking over things like what I thought made a good mother, what I would think of other people's actions and trying to apply the same standards to my own behaviour as other peoples - i.e. trying not to be too perfectionist/unrealistic. The cognitive element also involved recognising that I was being unrealistic, that just because I felt scared didn't mean that there was really anything to be scared of, to recognise that if I was being panicky it was OCD, so I had to resist washing my hands etc, and that what I was doing was really rather to reassure myself than being genuinely for the good of the baby. The behavioural element was exercises involving resisting the urge to wash my hands.
I have now started off something called schema therapy, which is a type of cognitive therapy. I have ended up doing this type of therapy as I wanted to continue seeing the same therapist that I saw when he was pregnant, and this was the type of therapy he offered. So I think this is one of several types of cognitive therapy. Schema therapy is a bit different to cognitive therapy in that it looks more at the roots of your problems/early childhood experiences - the theory behind it is that due to negative early experiences people have negative thoughts and patterns of behaviour (almost a negative stereotype of yourself) which leads you to being anxious and dysfunctional. I think that more mainstream cognitive therapy puts less focus on early childhood experiences and dysfunctional patterns of behaviour. But the general idea of cognitive therapy is to challenge your negative thougts about yourself, and to look at yourself more realistically. I.e. you might be asked to rate yourself between 1 - 100 at something - being a good mother and then work through why you don't think you're a good enough mother and talk about that with your therapist, and on the basis of your discussions realise that you are being too hard on yourself. One of the things you work on is a flashcard - so that when you feel down/anxious about yourself you think through why that isn't true, and the good things about yourself that show it isn't true. I am only having about 10 sessions of schema therapy - apparently my therapist thinks I am pretty functional (!) but more typically people would be doing this for a year/two years. My therapist is an NHS clinical psychologist, so he would deal with in-patients and more serious cases in his day job.