Yes, situational depression is a recognized medical diagnosis, also known as "adjustment disorder with depressed mood."
It is generally caused by a specific stressful or traumatic event and the symptoms occur within three months of the triggering event.
According to the DSM-5, the symptoms develop within three months of a specific stressor, they are more severe than normally expected from such an event, they do not meet the criteria for another mental disorder, and they are not related to a pre-existing condition.