"Přijít o" is a preposition connected to a verb in a very similar way to English "look after" or "wait for".
"Přijít k" means the opposite - "ke štěstí přišel", "přišel k penězům".
I don't get why the 'prisel o' has the form of 'he lost', but yet, it's 'I nearly lost...' Is there any specific reason for that?
Ok yeah, sorry I didn’t look for the word téměř but more about ‘přišel o’. I see now it’s because it’s past tense, but do I then don’t have to include ‘jsem’ if it’s ‘I lost’?
Yes, you do. You have to specify the first person using this auxiliary verb. In colloquial speech you can also say "já přišel" but that is not considered standard.