conversation statements

A: I have a headache. B: So have I.
A: I was depressed. B: So was I.
A: I enjoyed the movie. B: So did I.
Are these conversation statements correct?
Please comment.

I have a headache.
So do I.

[color=blue]I agree. And I wonder if many people are surprised that “have” is not the natural choice.

I’m surprised. And this is something new I learnt today.

A: I have lost his phone number. B: So have I.
Is it correct? Or the answer must be “So do I”?
Please clarify?

‘have lost something’ is obviously not the same pattern as ‘have a headache’. Of course ‘so have I’ is correct in that context.
You have been told many times that you should not be misled by trying to match language patterns and words.