I can provide some general information based on what I know up to that point.
Regarding the purpose of life, Islamic tradition holds that Prophet Muhammad (peace be upon him) was chosen by Allah (God) as the final prophet to deliver His message to humanity. While there are many teachings attributed to Prophet Muhammad, I don't have any records or hadiths (sayings and actions of the Prophet) indicating that he said he didn't know the purpose of life. Islamic belief centers around the concept that the purpose of life is to worship and submit to Allah and to follow His guidance as revealed in the Quran.
Regarding the second part of your question, it's not common in Islamic tradition to attribute statements to the Prophet in a manner that indicates he "felt like someone took his soul out." The hadiths that have been preserved and authenticated focus more on the Prophet's teachings, guidance, and character as a role model for Muslims.
However, it's worth noting that Islamic literature does mention occasions when the Prophet faced challenges, struggles, and moments of profound emotional intensity during his prophetic mission. For instance, he experienced hardships and persecution while preaching the message of Islam in Mecca, and he faced battles and loss in various stages of his life. Muslims admire his strength and perseverance during these trying times, but it's essential to approach such historical accounts with respect to their context and authenticity.
If you come across specific statements or quotes attributed to the Prophet Muhammad, it's always important to verify their authenticity and context to ensure accuracy and avoid spreading misinformation. Islamic scholars and experts in hadith sciences carefully evaluate the reliability of various narrations to distinguish authentic sayings from those that are weak or fabricated.