Disclaimer: I haven't actually seen this movie myself. However, based on the question, this is the sequence of events, as I understand it:
- Oscar witnesses somebody being raped (I presume anally) by a metal pole.
- Oscar later has (consensual?) anal intercourse with Andrew.
- Oscar is dealing with homophobia and his emerging sexual identity, the mental trauma of which induces him to vomit.
- He looks at his own vomit and imagines it filled with nuts & bolts.
To me, this seems like he's trying to deal with his feelings about homosexuality. He witnessed this terrible rape involving a metal pole and now he's imagining his own internals filled with metal bits and bobs. He's creating a mental association, presumably driven by his fear and homophobia. He wants to pursue his desires, but every time he tries to engage in a physical act, he's reminded of the unique aspects of the rape he witnessed, and thus is repulsed.
I don't know how it all ends, but assuming he's able to overcome his fear and accept himself for who he is, then I would expect the visions go away again by the end of the film.