If I understand you correctly, you are asking whether, when 'quoting' what someone thought, one uses the same rules as when quoting what someone said ('direct reported speech'). The answer is yes: you use the exact same punctuation, grammar, etc. when reporting what someone thought as when reporting what someone said.
Having said that, the first sentence is a bit strange, and would be strange even if instead of he thought to himself you had he said. I would break it up differently, so that he thought to himself appears within a single sentence, e.g.
"That," he thought to himself, "was a dream come true. Can this really happen?"