As I wrote in my comment, the first version of your question would have been useful to may here. But nonetheless, I will try answering for both of them.
It turned out that what happened was different from what I had/expected in my mind.
The resultant situation is something that happened later in time than when you made predictions about the same. And what do we use while talking about past of past? Yes, that's right. Past perfect tense.
Therefore, the following sentence would be more correct.
It turned out that what happened was different from what I had had/ expected in my mind.
Now it may seem confusing to have two "had" successively in a sentence. So what you do is break it down. When do we use a "had" before another past tense verb? In the past perfect tense. It would be easy to think about it when you have "had" followed by some verb like 'followed', 'expected', 'thought', etc.
Think on similar terms, had had would then be representing a situation when you had something even before something else happened.
Sorry, I am just not in the mood today. I have a lot going on currently.
When you narrate this instance to one of your friends later in time, say week later, you would say:
I responded to him saying that I was not in the mood that day. I had had a lot going on then.
This post would certainly help you a lot in understanding the different tenses and how they are used.