(Not a teacher)
It can't be 'were coming' because spaceship is singular. If it was spaceships, it would be 'were coming'.
I guess it could be 'could come', but it changes the meaning of the sentence. 'Could come' means that they might come. 'Was coming' means that it already came.
If you wanted the sentence to remain in the past, but show that there was uncertainty of whether or not the spaceships would come then 'could have come' would be appropriate.
To sum up then:
'... because the spaceship was coming.' - It was in the past and the people killed themselves because it was certain that the spaceship was coming.
'... because the spaceship could come.' - It isn't certain if the spaceship will come in the future.
'... because the spaceship could have come.' - It wasn't certain if the spaceship would come in the past when the events happened.
I understand that 'could' is a past tense inflection, so maybe that's why you thought it was past. 'Could' here, however, isn't the past of 'can', as it has nothing to do with the spaceship's ability to come. 'Could' here just means 'might' or 'may'.
Interested in Language