The in stands for something like "in that it is", "while", "as it is" or "when" in this sentence.
The mentioned complexity and rawness are found in how the said piece "thinks" through their friendship and how we mourn.
The "thinking through" would give me more trouble in understanding the sentence, honestly, but in the context I assume the writer means that the piece shows how the author reminisces about the friendship and explores how we mourn.
Basically, the reason to call the piece raw and complex is the way it deals with their friendship and the way we mourn. We don't know whether it is raw or complex when it talks about other subjects. Actually, we don't even know if the piece deals with any other subjects. Obviously, the writer of the article thought these two themes were the most important - and they make the piece raw and complex.
As to you sidenote: I have no reason to believe that the word "lovers" is used here to indicate anything else than the fact the two people mentioned were involved in a romantic relationship. It doesn't necessarily mean they were in love or that they felt they had a meaningful, long-lasting relationship, by the way. "Briefly, they were lovers" basically means that they were romantically involved for some short period of time.