What, in general, is the best protocol to maintain relationships with former colleagues/bosses when you are terminated? Can you still be friends and ask for good recommendations from them? Or should you just forget about them entirely and only have the HR department of the company provide neutral references? 

**Added**: The insinuation/connotation was that I was fired, but technically it was a layoff because I got a severance.