Most European languages developed from a single language called Proto-Indo-European, spoken approximately between 4500 BC and 2500 BC somewhere in the Ukrainian and Russian steppe, according to the most widely accepted hypothesis.
The basic words in most modern European languages (such as pronouns and numbers) mostly developed from a single word in Proto-Indo-European, although their current forms have changed beyond recognition.
Historical linguistics is capable of reconstructing many such words with great precision. The diagram below shows the development of the Proto-Indo-European word for “I”, from its reconstructed forms in languages that are no longer spoken up to the modern forms:
As you can see, there are three different variants given for Proto-Indo-European. These can be reconstructed from different groups of proto-languages, and the first variant given above is likely the oldest one, while the others were likely dialectal in Proto-Indo-European.
However, many aspects of the reconstruction seem to be uncertain, including the actual value of the laryngeal “H”. Some linguists put the laryngeal *h₁ at the beginning of all three variants.
The path from Proto-Indo-European to modern Slavic languages seems to be even less clear. The Proto-Balto-Slavic form given here is due to Kapović (2009), and the Proto-Slavic form is according to Olander (2015).
The letter “g” with an acute accent in the reconstruction represents a soft “g”, which explains why it could change to a “zh” sound in Proto-(Balto-)
Finally, it should be noted that Celtic languages are not present in the diagram at all. The reason is that the Proto-Celtic pronoun meaning “I” is derived from a different root (from the Proto-Indo-European pronoun *me, which means “me” in English).