I drove myself to the dentist because I had a bad tooth. The dentist put me to sleep to give my tooth a root canal procedure. I was too sleepy to drive myself home, and I told my friend, "I wish you had come with me, so you could have driven me home". I had to wait 3 hours so I would be awake enough to drive myself back home.
Your first sentence is fine. The second sentence, maybe you mean "I called him and invited him to come with me, and he said he was too busy to come. Later I said "I wish you had come with me".