I want to write a sentence, but without using "I" as a first word. Is "Choosing the right course has been treated by me as a key element in developing my interests" correct? Should I put "by me" at the end or any other advises?
This is a somewhat clumsy choice of sentence structure.
The sentence would really sound a lot more natural if you began it with the word "I": "I have treated choosing the right course as a key element ..."
But, if you must use the passive voice ("has been treated"), then the sentence you mention is correctly written. The phrase, "by me" is in the right position. It would not sound good at the very end of this long statement.