Hi,

Can I use "were doing" or "were going to do something" instead of "would" after "wish" ?
He is leaving tonight. I wish he were not leaving.
She is going to marry Jim. I wish she were not going to marry Jim.

Thank you.

Yes, although it would be very formal. These examples work because the wishes go against reality, so the subjunctive mood (were) makes sense (see: How Do You Write In The Subjunctive Mood? | Dictionary.com.).

Most people would use "would" or the indicative mood (was):
I wish he wouldn't leave / I wish he wasn't leaving
I wish she wouldn't marry Jim / I wish she wasn't going to marry Jim