וְיָדַעְתָּ֖ עִם־לְבָבֶ֑ךָ כִּ֗י כַּאֲשֶׁ֨ר יְיַסֵּ֥ר אִישׁ֙ אֶת־בְּנ֔וֹ יְהֹוָ֥ה אֱלֹהֶ֖יךָ מְיַסְּרֶֽךָּ
You shall consider in your heart that as a man chastens his son, so Hashem your God chastens you.
וְתִדַּע עִם לִבָּךְ אֲרֵי כְּמָא דְּמַלֵּיף גּוּבְרָא יָת בְּרֵיהּ יְיָ אֱלָהָךְ מַלֵּיף לָךְ.
and know with your heart, that as a man instructs his son, (so) the Lord your God instructs you.
Unkelos translates יסורין as INSTRUCTION, TEACHING. The purpose of life's pains are NOT that we should suffer per se but that we should learn.