Emotions evolved as a means to perform a "Decision" automatically, and adapted into behavior controlling/modifying internal signals that improve survival.
Seeking out a companion because you are lonely, improves the chances of copulation, for instance. Mutual collaborative efforts improve the survival rates of both participants, as another. Thus, the urge to seek a companion has a strong survival bonus to the organism, even if that companionship is not sexual.
I am thinking that our nervous systems will be electrochemical, with semiconductor junctions, and should exploit energy gradients from saline substances being dissolved in our silicon chloride base solvent. (As opposed to sodium, potassium, and calcium ions being dissolved in water based solute in terrestrial life.) This would make us somewhat of a bizzare mash up between a lithium salt battery, a solar collector, a conventional computer, and an electrolysis bath.
This would give us a bonus to grafting artificially constructed conventional computer components to our nervous systems, as long as their energy draw and heat production did not overtax our physiology. (We need the bio-electricity to drive our high-energy metabolism)
We may or may not have "instinctual programming", that results from a structural basis (wire based programming similar to ROM, that gets produced as part of our embryonic development), which strongly colors our decision making processes, and would serve a similar function to emotions in terrestrial lifeforms.